EA Backtesting Explained
How to read an MT5 Expert Advisor backtest, what historical results can tell you, what they cannot prove, and how to avoid being misled by attractive curves.
What a backtest does
A backtest applies an EA's rules to historical market data to estimate how those rules would have behaved under the selected test conditions. It is useful for checking whether the strategy logic behaves as intended, exploring sensitivity to inputs, and identifying periods where the system struggled. A backtest is not a time machine and cannot reproduce every detail of a future live account.
Data quality and modeling
The quality of the historical data and the testing configuration matters. Timeframe, tick data, spread assumptions, commissions, swaps and symbol specifications can change the result. A test that ignores realistic trading costs may look materially better than the same strategy under conditions closer to the intended broker. When comparing tests, keep the environment consistent and document the assumptions.
Key metrics to inspect
Do not focus only on net profit. Look at maximum drawdown, number of trades, average trade, profit factor, recovery behaviour, losing streaks and the distribution of results over time. A high return with a very large drawdown may be unsuitable for a conservative account. Likewise, a smooth curve produced by very few trades may not provide much evidence about how the strategy behaves across different conditions.
Avoid over-optimization
Optimization can search many parameter combinations until one looks excellent on historical data. The danger is fitting the settings to noise rather than to a durable market relationship. A better workflow is to use a development period, choose reasonable parameters, and then test the unchanged configuration on a separate period. If performance collapses immediately outside the optimized sample, the strategy may be overfit.
Forward testing
Forward testing on a demo account adds a different layer of evidence because the EA must interact with the live broker environment. It can reveal symbol differences, spread behaviour, execution delays, connection issues and practical configuration mistakes. Forward testing does not guarantee future profitability, but it can expose problems that historical testing cannot reproduce.
How to report results responsibly
A useful test report should state the symbol, timeframe, date range, deposit assumptions, position sizing method, spread and cost assumptions, and important strategy settings. It should also explain limitations. Avoid presenting a backtest as proof of future performance. Historical results are evidence for analysis, not a promise to a future buyer or trader.
This article is educational information, not investment advice. Trading financial markets involves risk, and historical or simulated results do not guarantee future performance.