The Tester has 30+ settings. Most of them do not matter. The 7 that do, and how to configure them so your backtests are valid signals rather than wishful curve fits.
Press Ctrl+R or View > Strategy Tester. The Tester panel opens at the bottom of MT5, with three tabs: Settings, Inputs, Results.
The Settings tab is where everything important happens. Get this wrong and the rest is fiction.
Choose the EA from the dropdown. Only compiled EAs in your MQL5/Experts folder appear.
Critical for realism. Use the exact symbol you would trade in live. Different brokers have different specifications, different spreads, different swap rates. Backtesting on a different broker's symbol approximates that broker's behaviour, not yours.
The base chart timeframe the EA uses. This is the "main" timeframe. Your EA can reference other timeframes too (via iCustom or iMA on different periods), and the Tester handles that transparently.
This is the single most important setting. Five options:
| Mode | What it does | When to use |
|---|---|---|
| Every Tick Based on Real Ticks | Uses your broker's actual recorded tick history | Always, when available. The gold standard. |
| Every Tick | Generates synthetic ticks within each bar based on OHLC | When real ticks unavailable. Less accurate but acceptable. |
| 1 minute OHLC | Steps through M1 bars only; assumes one tick per bar | Quick smoke tests. Not for serious validation. |
| Open Prices Only | Steps through bar opens of the chosen timeframe | Strategy logic uses only completed bars and is not sensitive to intra-bar movement. Fastest. |
| Math Calculations | No price simulation at all | Custom math-only optimisations. Niche. |
The single biggest backtesting error: using Open Prices Only on a strategy that depends on intra-bar movement (e.g. checks if price touched a level during the bar). The backtest looks profitable but live performance is completely different because the strategy never triggers the way it does in real markets.
Three options: Current, Random, or specify a fixed value.
Real-world advice: run your initial validation with Current. Then run a stress test with 1.5x to 2x the spread to see how spread-sensitive the strategy is.
From and To dates for the test period. Two principles:
This setting splits your test range into in-sample (for optimisation) and out-of-sample (for forward validation). Options: No forward, 1/2, 1/3, 1/4, or Custom.
Use 1/3 or 1/4 as a starting point. The Tester optimises on the in-sample period, then validates on the held-out forward period. If the strategy degrades drastically on forward, it is curve-fit.
Switch to the Inputs tab. You see every external input the EA exposes. For each, you can:
Example: an EA has inputs MovingAveragePeriod (default 20), StopLossPips (default 50), TakeProfitPips (default 100).
To optimise: tick the Optimise box next to MovingAveragePeriod, set Start=10, Step=5, Stop=50. The Tester will run nine passes (10, 15, 20, 25, 30, 35, 40, 45, 50) and report results for each.
Above the Inputs tab is an Optimisation dropdown:
Use Genetic for initial exploration. If you find a promising region of parameter space, narrow the ranges and use Complete to verify.
After a backtest, the Results tab shows summary statistics and the equity curve. The most-misunderstood metrics:
| Metric | What it actually means |
|---|---|
| Net Profit | Total P/L in deposit currency. Obvious. |
| Profit Factor | Gross profit / gross loss. Above 1.5 is good, above 2.0 is suspicious (likely curve-fit). |
| Expected Payoff | Average P/L per trade. Should be positive and stable across periods. |
| Absolute Drawdown | Worst loss from initial balance. Less useful than relative drawdown. |
| Maximal Drawdown | Worst peak-to-trough loss. The number you should size positions around. |
| Relative Drawdown | Maximal drawdown as percentage of balance at the peak. The most useful single number. |
| Recovery Factor | Net profit / max drawdown. Above 5 is good, above 10 is suspicious. |
| Sharpe Ratio | Risk-adjusted returns. MT5 calculates it on a per-trade basis, not annualised, so the number looks different from textbook Sharpe. |
Look at the Graph tab. A healthy equity curve is steadily up and to the right, with drawdowns but no flatlines and no clusters of losses concentrated in narrow periods. A curve that ramps then plateaus suggests the strategy worked under one market regime and stopped working when conditions changed.
After an optimisation, the Optimisation tab shows every parameter combination tested, ranked by your chosen metric (default: profit).
What to look at:
Open Prices Only modelling. Default inputs. 6 month test. Just confirms the EA runs without errors and trades approximately as expected. Takes 1 to 5 minutes.
Every Tick Based on Real Ticks. Default inputs. 5+ years. Current spread. No forward split. Look at equity curve and drawdown. If the curve is ugly, fix the strategy before optimising parameters.
Genetic optimisation across a few key parameters. Forward = 1/3. Look for stable parameter neighbourhoods. Pick a parameter set from a stable region.
With your chosen parameters, run additional backtests at 1.5x spread, 2x spread. Run on a different broker's symbol if you have access. Run with different starting dates (rolling 1-year windows).
Deploy on a demo account for 1 to 3 months. Compare actual demo performance to the backtest expectations. Any major divergence means the backtest was misleading.
Deploy on live with 1/10th of intended position size for the first month. Real fills may differ from demo. Confirm before scaling up.
From your broker's history server. Your MT5 client downloads it on demand when you run the Tester. The first run on a long historical period may take 10 to 60 minutes just to download.
For low-frequency strategies (above 5-minute holding times), Every Tick is acceptable. For sub-minute scalping, Real Ticks matters significantly because the intra-bar ordering of ticks affects fill prices.
Yes. The MT5 Strategy Tester has supported multi-currency (multi-symbol) testing since the platform launched in 2010. The tester automatically downloads history for any additional symbols your EA references via standard MQL5 calls. You select one "primary" chart symbol but the EA can read prices from, and trade, any symbol the broker exposes.
Real Ticks modelling on multiple years is genuinely slow. Use Open Prices Only for initial development iterations. Switch to Real Ticks for the final validation pass.