Trading Systems Lab
Practical notes on EA building, MT5 testing, risk control, and market timing. Less hype, more systems.
What Is the Best Timeframe for an EA? What Our Backtests Say
There is no best timeframe for EA trading. We tested one strategy on M1, M5, M15 and M30 and found a peak at M15. Here is why the others lost, and how to find yours.
EA timeframe M15 Spread Strategy Tester MT5 Backtesting techniquesRunning the MT5 Strategy Tester From the Command Line
Run MT5 backtests unattended with a [Tester] config file: the settings we use, and four ways the tester silently ran the wrong test.
Strategy Tester Command Line Automation Python MT5 Backtesting techniquesForward Testing in MT5: How We Test Out of Sample
What MT5's forward setting does, why we run out-of-sample windows as separate tests, and the EAs those windows rejected.
Forward Testing Out of Sample Walk Forward Strategy Tester MT5 Backtesting techniquesEvery Tick vs Real Ticks in MT5: Which Mode to Use
The difference between Every tick and Every tick based on real ticks in the MT5 Strategy Tester, what it changed in our own backtests, and when it matters.
Every Tick Real Ticks Strategy Tester Spread MT5 Backtesting techniquesMT5 History Quality: What the Percentage in Your Report Means
What the History Quality line in an MT5 Strategy Tester report measures, why ours reads 8% real ticks, and how much generated ticks changed our results.
MT5 History Quality Real Ticks Strategy Tester MT5 Backtesting techniquesSetting Drawdown Limits for Expert Advisors
Learn how to set maximum drawdown limits for Expert Advisors (EAs) to manage risk in automated trading strategies effectively.
automated trading Expert Advisors drawdown limits risk management trading strategies techniquesWriting EAs That Are Easy to Test, Optimize, and Trust
When it comes to the world of Forex trading, Expert Advisors (EAs) have revolutionized the way we approach the market. However, the true power of an EA lies not just in its ability to execute trades but in the robustness of its design, particularly in how easily it can be tested, optimized, and ultimately trusted. In this deep dive, we’re going to explore the essentials of creating EAs that stand the test of time and market fluctuations, focusing on an effective EA testing framework, backtesting design, parameter optimization, and EA validation.
EA Testing Framework techniquesRisk Management in Code: Stop Thinking, Start Programming
Learn how to implement real EA risk management in MT5. Discover practical techniques for position sizing, drawdown control, and risk filters that protect automated trading systems in live markets.
EA Risk Management Position Sizing Drawdown Control Risk Filters MT5 Risk Management techniquesBuilding Multi-Symbol and Multi-Timeframe EAs in MT5
Learn how to build scalable multi-symbol and multi-timeframe EAs in MT5. Discover best practices for symbol handling, execution safety, synchronization, and performance optimization for production-ready trading systems.
MT5 Multi-Symbol EA Multi Timeframe Trading Symbol Handling EA Scalability MT5 Automation techniquesFixed Lot vs Risk-Based Lot: What Works Long Term
Choosing the right lot sizing strategy is the difference between a blown account and a professional equity curve. Compare fixed lot vs percent risk for long-term EA success.
Lot Sizing Strategy Fixed Lot Percent Risk Money Management Forex Position Sizing techniquesWhy Most EAs Fail in Production (and How to Code Around It)
Most Expert Advisors fail not in backtests, but in live trading. Learn the real reasons EAs fail in production, from execution risk to hidden assumptions, and how to code MT5 EAs that survive real market conditions.
EA failure reasons Live Trading Issues Execution Risk EA Reliability MT5 EA Development techniquesWhy Winning Streaks Are More Dangerous Than Losing Ones
Discover why winning streaks in trading can be more lethal to your account than losses. Master trading psychology, avoid overconfidence, and protect your capital.
Trading Psychology Overconfidence Risk Escalation Capital Protection Forex Winning Streaks techniquesHow to Optimize an MT5 EA Without Overfitting
How to choose parameter ranges, why flat plateaus beat sharp peaks, and how forward testing in the Strategy Tester shows whether an optimized EA works on data it has not seen.
Parameter Optimization Curve Fitting Walk Forward Analysis EA Robustness MT5 Optimization techniquesFrom Indicator to Execution: Turning Ideas Into MT5 EAs
Learn the real EA development process from indicator idea to live MT5 execution. A practical guide covering indicator logic, signal generation, risk handling, and order execution for building robust Expert Advisors.
EA development process indicator logic signal generation order execution MT5 EA development techniquesThe Psychology Behind Overtrading (and How to Stop It)
Overtrading is one of the fastest ways to destroy a trading account. Learn the psychology behind overtrading, why traders and EAs fall into it, and how discipline and structure stop it.
Overtrading Psychology Trade Frequency Emotional Control Trading Discipline Forex Risk Management techniquesTrendEA.mq5 + Trend.mqh Explained: Line-by-Line Walkthrough (MT5) Part 2
A practical, line-by-line walkthrough of a production-ready MT5 Trend EA architecture: a pure strategy module (Trend.mqh) and an execution engine (TrendEA.mq5). Learn how indicator logic becomes signals, how signals become orders, and how safety gates keep EAs reliable in live trading.
MQL5 Code Walkthrough Trend EA MT5 EA Architecture EA Execution Engine Maintainable EA techniquesTrendEA.mq5 + Trend.mqh Explained: Line-by-Line Walkthrough (MT5) Part 1
A practical, line-by-line walkthrough of a production-ready MT5 Trend EA architecture: a pure strategy module (Trend.mqh) and an execution engine (TrendEA.mq5). Learn how indicator logic becomes signals, how signals become orders, and how safety gates keep EAs reliable in live trading.
MQL5 Code Walkthrough Trend EA MT5 EA Architecture EA Execution Engine Maintainable EA techniquesMT5 Strategy Tester Report: Every Field Explained
What each field in the MetaTrader 5 Strategy Tester report means, from profit factor and recovery factor to balance vs equity drawdown and Z-score, and the three to read first.
MT5 Backtest Profit Factor Drawdown Expert Advisor Strategy Tester techniquesDesigning EA Logic That Survives Market Regime Changes
Markets change faster than most EAs. Learn how to design EA trading logic that survives market regime changes using adaptive structure, regime filters, and robustness-first thinking instead of brittle optimization.
EA trading logic market regimes adaptive EA system robustness MT5 EA development techniquesRisk of Ruin: Why Most Traders Blow Up Eventually
Risk of ruin explains why many traders and EAs fail over time. Learn how probability, account survival, and loss streaks determine whether your trading system lives or dies.
Risk of Ruin Probability Trading Account Survival Loss Streaks Forex Risk Management techniquesEA .set Files Explained: How to Tune a Scalp Strategy Safely
Learn how to adjust a MetaTrader EA .set file for a scalping strategy. This guide explains ADX, ATR, filters, risk controls, and why systematic backtesting is essential for maximizing EA performance.
EA Set File MT5 Scalping Strategy ADX ATR Trading EA Parameters EA Backtesting Guide techniquesRangeRevert EA Explained: Mean Reversion With ATR + ADX Gates (MT5)
A developer-friendly breakdown of the RangeRevert MT5 EA: what it is, how the MQ5 engine and MQH strategy module work, key inputs, and a real .set example you can copy and tune.
RangeRevert EA MT5 mean reversion ATR filter ADX range filter Bollinger reclaim techniquesHow Professional Traders Think About Drawdowns
Drawdown management is the difference between surviving and quitting. Learn how professional and EA traders think about equity curves, risk tolerance, and recovery strategies.
Drawdown Management Equity Curves Risk Tolerance Recovery Strategy Forex Risk Management techniquesMT5 Modeling Quality: Why 99% Can Still Mislead
What the modeling quality percentage in the MT5 Strategy Tester measures, why 99% does not make a backtest realistic, and when real-tick data is worth it.
MT5 modeling quality tick data real ticks backtest precision MT5 backtesting techniques7 MQL5 EA Coding Mistakes That Quietly Kill Performance
Seven MQL5 mistakes that pass a backtest and fail live: trusting the current bar, mixing risk with signal logic, ignoring execution costs, no trade-frequency cap, and more.
EA programming mistakes MQL5 bugs EA optimization trading system errors MT5 EA development techniquesPosition Sizing in Forex: The Only Formula That Actually Matters
Position sizing is the true core of profitable forex and EA trading. Learn how lot calculation, account risk, and trade sizing determine long-term performance more than any entry strategy.
Position Sizing Lot Calculation Account Risk Trade Sizing Forex Risk Management techniquesHow to Backtest an EA in MetaTrader 5, Step by Step
Seven steps to backtest an Expert Advisor in the MT5 Strategy Tester without fooling yourself: data quality, modeling mode, real spreads, optimization limits and forward testing.
MT5 Backtesting Backtest Accuracy Modeling Quality Historical Data MT5 EA Optimization techniquesClean MQL5 Code: Writing EAs You Can Maintain for Years
Learn how professional EA developers write clean, maintainable MQL5 code that survives years of refactoring, optimization, and live trading. Practical patterns, real EA examples, and refactoring mindset for serious algo traders.
MQL5 Programming Clean Code Maintainable EA EA Refactoring MT5 EA Development techniquesWhy Risk Management Matters More Than Your Entry Strategy
Learn why trading risk management beats perfect entries. Practical guidance for EA traders on position sizing, drawdown control, and risk vs reward to achieve consistent performance.
trading risk management position sizing drawdown control risk vs reward EA trading techniquesHow I Structure a Profitable MT5 EA From Scratch
Learn how to structure a profitable MT5 Expert Advisor from scratch. This guide covers EA architecture, MQL5 file structure, trading logic design, and production-ready best practices used in real trading systems.
MT5 EA development EA architecture MQL5 structure trading logic design algorithmic trading techniquesFixing My Least-Winning MT5 EA: Tokyo Swing Trend (USDJPY H1) — Why Exits, Trailing, and Sizing Matter More Than Entries
I break down my “least winning” MT5 EA (Tokyo_SwingTrend_USDJPY_H1) and explain the real reasons it struggles: an ambitious 2.5R target paired with RSI pullbacks, a too-tight ATR trailing stop, and fixed minimum lot sizing. I also share practical, code-ready optimization directions: 1.5R–1.8R targets, trailing start at 1.5R with wider steps, equity-risk position sizing, and session/time logic driven by data.
MT5 EA development USDJPY algorithmic trading ATR trailing stop risk-based position sizing RSI pullback strategy techniquesEA Predefined Methods Explained: The Real Structure of MT5 Expert Advisors
Learn all predefined methods used in MT5 Expert Advisors. This beginner-friendly guide explains OnInit, OnTick, OnTrade, indicators, trading functions, and which ones actually matter when building real EAs.
MT5 EA Methods MQL5 Predefined Functions Expert Advisor Tutorial EA Programming Basics MT5 Automation techniquesCategories
Tags
- Pick a session (Tokyo/London/NY) and test one idea.
- Use fixed risk per trade, then optimize only after stability.
- Bookmark your best setups and keep a track record.