What the MT5 strategy tester does and does not test
3 min read
The MT5 strategy tester simulates a strategy against historical data, with quality that depends on the modeling mode and the history available. What no historical simulation can know: your order's place in the queue, the venue's latency at that moment, and the liquidity actually present at your price when the order arrives.
The MT5 strategy tester runs an expert advisor against historical data and reports how it would have traded. [1] The platform documents the moving parts: the tester replays history in a chosen modeling mode, the strategy's code reacts through the same trading functions it would use live, and the result is a simulated account history. [2] Used well, it answers a real question: did this strategy's rules, applied to this history, produce the behaviour the designer intended.
It is worth being precise about what that simulation contains. The tester knows the historical prices, the strategy's orders, and the platform's model of how such orders fill against such prices. The modeling mode governs how finely history is replayed, and the quality of any run is bounded by the quality and completeness of the price history behind it. [1] Within those bounds, the tester is a legitimate laboratory: logic errors, broken money management, and rules that only ever worked on one regime all show up here, cheaply, before any live order exists.
What no historical simulation can contain, whatever its settings, are the parts of execution that were never recorded in the price series. Three matter most.
The first is queue position. A live limit order joins a line of orders at its price, and whether it fills depends on where it stands in that line when trades arrive. Historical price data records that trades happened, not the queue the order would have stood in, so a simulation must assume an answer rather than observe one.
The second is latency. A live order travels from the strategy to the broker to the venue, and the market moves while it travels. The delay differs by venue, by route and by moment, and none of it is in the candles. A backtest fills at the recorded price; a live order fills at whatever the price has become by the time it arrives.
The third is liquidity at the touch. A recorded price says that some quantity traded there, not that any additional quantity could have. A simulated order of any size fills at the printed price; a live order of real size consumes what is actually offered and moves on to worse levels. The larger the order relative to the market, the wider the gap between those two statements.
None of this is a defect in MT5. These are structural limits of testing against recorded history, shared by every backtesting engine, and the honest comparison between engines is about what each one models explicitly rather than which one escapes the limits. [3] The practical conclusions follow directly. Treat the tester as the place where strategy logic is proven and killed. Treat execution assumptions, fills, slippage and spread as declared inputs to the simulation, not facts it discovered. And treat the transition to live trading as its own experiment, run small, whose purpose is to measure exactly the things the tester could not: how the strategy's orders actually fill, at what delay, against what liquidity.
A researcher who keeps that boundary in view gets the best of both: a fast, controlled laboratory for the parts of the system that history can test, and an explicit checklist for the parts only the live market can grade.
Drafted with AI assistance from cited sources. Reviewed and approved by Sonar Sciences Quant & Research Team.