MetaTrader Strategy Tester
The Strategy Tester is a built-in MetaTrader module that runs an EA on historical quotes and produces a report of trades and metrics.
Modeling modes
"Open prices only" calculates one point per bar: fast and appropriate for strategies that make decisions at candle close. "Every tick" is tens of times slower and makes sense when an EA reacts within the bar. Editor’s note: This is simplified source guidance. Before relying on this mode, check whether the EA’s entries, stop losses, targets or other exits depend on price movement within a bar.
MT4 displays modeling quality separately: a value below 90% means the tester reconstructed missing data, so the result cannot be trusted.
Running without the interface
The terminal accepts a /config switch with an ini file containing [Tester] and [TesterInputs] sections. This turns a test run into a one-line command and lets a script cycle through hundreds of configurations.
A detailed walkthrough with a ready-made script is in part two of the MQL5 series.
Common mistakes
- •Optimizing for net profit: this selects the riskiest combinations. Profit factor or the return-to-drawdown ratio is a better choice.
- •Testing on quotes from a broker you do not intend to trade with.
- •Forgetting that the tester knows nothing about slippage or spread widening during news releases.
FAQ
Why are tester results better than live-account results?
The tester uses ideal execution and usually an understated spread, without modeling slippage or delays. The difference is especially large for scalping and breakout strategies. <strong>Editor’s note:</strong> The statements about execution effects reflect the source’s simplified testing assumptions. Check the actual terminal version, test mode and execution settings rather than treating them as universal feature limits.
Can I trust a test with 99% quality?
Modeling quality indicates only the completeness of quotes, not the realism of execution. Even at 99%, the test remains an upper-bound estimate.
Related terms
See it on live data
Profit factor, drawdown and win rate of the expert advisors in our catalog are shown in the EA rating — these are demo accounts whose results cannot be edited after the fact. The robots themselves are in the free expert advisor catalog.