How the MetaTrader Strategy Tester Works
Every MetaTrader backtest is a simulation: the Strategy Tester replays historical prices against your expert advisor and fills its orders under a set of assumptions. Those assumptions — where the data came from, how ticks are modelled, what spread is charged and how orders fill — decide how much the final report says about real trading. The sections below walk through what the tester actually does at each stage, in MT4 and MT5, and where the simulation departs from a live account.
Key takeaways
- The Strategy Tester replays historical prices through your EA and simulates fills — the report is only as reliable as the data and modelling assumptions behind it.
- Tick modelling matters: 'Every tick' interpolates a synthetic path inside each 1-minute bar, while MT5's 'Every tick based on real ticks' replays the broker's recorded quotes.
- Generated-tick tests usually apply one fixed spread to the whole history, so the spread spikes that happen around news are invisible to them.
- Execution in the tester is idealized: instant fills at the modelled price, no requotes, no rejections and no latency.
- Modelling quality (MT4) and history quality (MT5) measure how complete the input data is — not whether the strategy is any good.
- Optimization can sweep thousands of parameter sets, and the best historical combination is partly fitted to noise, so it needs out-of-sample confirmation.
A controlled replay of history
The Strategy Tester takes an expert advisor, a symbol, a timeframe and a date range, and replays the historical prices of that range through the EA one event at a time. Every time the EA opens, modifies or closes an order, the tester fills it against the simulated price stream, tracks balance, equity and margin along the way, and compiles the whole run into a report.
Historical data
Bars or ticks downloaded for the test range
Tick model
Real, generated or per-bar prices
EA logic
Decisions on each simulated price update
Simulated fills
Orders filled under tester rules
Report
Profit, drawdown, trade list, statistics
The scale is easy to underestimate. Two years of EUR/USD on H1 is roughly 12,400 hourly bars — but in every-tick mode the tester expands those into tens of millions of simulated price updates. That is why the choice of modelling mode changes both how accurate a test is and how long it takes to run.
Where the historical data comes from
MT4 downloads bar history — typically 1-minute bars — from the broker’s history centre, and everything finer than a minute has to be generated. MT5 requests history from the trade server too, and where the broker publishes it, that includes real tick history: every recorded quote with its bid and ask.
- Data is broker-specific. Server timezone, spread model and tick filtering all shape the bars, so the “same” symbol differs slightly between brokers.
- Old history is often patchy — missing minutes or whole sessions — and the tester silently works with whatever it has.
- Tick history is large (often gigabytes per symbol-year) and not every broker provides it for every instrument or period.
Tick modelling: how the gaps get filled
A 1-minute bar stores only four prices: open, high, low and close. Unless real ticks are available, the tester has to invent the path between them. Each modelling mode makes a different trade-off between fidelity and speed:
| Mode | Price source | Fidelity | Speed |
|---|---|---|---|
| Every tick based on real ticks (MT5) | Broker-recorded ticks with actual bid/ask | Highest — the real sequence and the real spread | Slowest; largest data downloads |
| Every tick (MT4 & MT5) | Synthetic ticks interpolated inside each M1 bar | Bar shapes are exact; the intrabar path is invented | Slow |
| 1 minute OHLC (MT5) / Control points (MT4) | A handful of reference prices per minute | Coarse — intrabar fills are approximations | Fast |
| Open prices only | One price per bar of the tested timeframe | Valid only for EAs that act strictly at bar open | Fastest |
The cost of interpolation is concentrated in intrabar logic. Generated ticks follow a predetermined pattern through the bar, so the tester is guessing whether the high or the low came first. An EA with a 5-pip stop and a 7-pip target inside a 15-pip M1 bar can be filled in either order depending on that guess — and the tighter the levels, the more often the guess decides the trade.
Spread: one number versus a recorded stream
With generated ticks there is no recorded spread, so the tester applies a stand-in. MT4 uses a fixed spread in points (or a snapshot of the current one) across the entire history; MT5 with generated ticks uses the spread stored alongside each minute bar or a fixed custom value. Only real-tick testingreplays the bid/ask that actually existed — including the widening around news and rollover.
Fixed spread vs live-like spread on a scalping EA
- EA profile: average win 6 pips, ~400 round-trip trades per year on EUR/USD.
- Backtest with fixed 1.0-pip spread: cost = 400 × 1.0 = 400 pips per year.
- Realistic feed: spread averages 1.4 pips and spikes to 4+ around news.
- Effective cost ≈ 400 × 1.5 = 600 pips per year.
- The extra 200 pips equal about 33 average wins — enough to flip a thin edge negative.
The shorter the average trade, the bigger this effect. A strategy targeting 60 pips per trade barely notices half a pip of extra spread; a 6-pip scalper lives or dies by it.
Execution is idealized
However the prices are modelled, the tester’s execution layer is friendlier than any live server:
- Market orders fill instantlyat the current modelled price — no latency between decision and fill.
- There are no requotes or rejections; every order the EA sends is accepted.
- Stop and limit orders trigger exactly at their level, with no slippage through fast markets.
- Liquidity is unlimited — a 0.1-lot and a 50-lot order fill at the same price.
These simplifications are individually small and collectively significant. If live execution costs an average of 0.2 pips of slippage per side, that is 0.4 pips per round trip — 8% of the average win for a strategy that makes 5 pips per winning trade, and effectively zero in the backtest.
Quality metrics describe the data, not the strategy
MT4 prints a modelling quality percentage, capped at 90% because it never has real ticks: 90% means complete M1 data covered the range and ticks were generated from it. It also counts mismatched chart errors— inconsistencies between the timeframes used to build the test. MT5 reports a history quality figure with the bar and tick counts behind the run.
Optimization and the overfitting trap
The tester can also run the same EA hundreds or thousands of times with different parameter values — exhaustively or with a genetic algorithm, and in MT5 across multiple CPU cores or remote agents. Three parameters with 20 values each is already 8,000 candidate runs.
The trap is built into the method: the best combination is the best on that one sample of history, by construction, and part of its edge is fitted to noise that will not repeat. MT5’s forward-period option, which re-checks the top results on data the optimizer never saw, is one defence; the guide to more reliable backtests covers this workflow in detail.
Why the live account still disagrees
Put the pieces together and the gap between a report and a live account stops being mysterious: modelled ticks instead of real ones, one spread instead of a changing one, perfect fills instead of real execution, and parameters tuned to the tested period. How each of those gaps biases results — and how to spot them in a report — is the subject of why backtests can be misleading.
A practical first step is reading your own reports more carefully: the free MetaTrader Backtest Analyzer parses an MT4/MT5 tester report in your browser and surfaces the statistics — drawdown, streaks, distribution — that a headline profit number hides.
Frequently asked
What is the difference between 'Every tick' and 'Every tick based on real ticks'?
'Every tick' generates a synthetic sequence of prices inside each 1-minute bar, because the bar only stores four prices (open, high, low, close). 'Every tick based on real ticks' is an MT5 mode that downloads and replays the broker's actual recorded ticks, including the real bid/ask spread at each moment — higher fidelity, but slower and dependent on the broker publishing tick history.
What does 90% modelling quality mean in an MT4 report?
It is a data-completeness score, capped at 90% because MT4 never has real ticks. It means 1-minute bars were available for the whole test range and ticks were generated from them. It says nothing about whether the strategy works — a 90% test of a curve-fitted EA is still a curve-fitted EA.
When is 'Open prices only' safe to use?
Only for EAs that make every decision exactly at the open of a new bar and never use intrabar logic — no trailing stops, no stop/limit levels expected to fill mid-bar. For such EAs it gives the same trade sequence as slower modes at a fraction of the runtime, which is why it is popular for first-pass optimization sweeps.
Does the Strategy Tester simulate slippage and requotes?
No. Orders fill at the modelled price with idealized execution — no slippage, no requotes, no latency — and spread handling is simplified. That is one reason a backtest is a historical simulation rather than a forecast: a live account adds exactly the frictions the tester leaves out.
Related guides
Why Backtests Can Be Misleading
Curve fitting, optimistic cost assumptions and bad data — the main reasons a great backtest fails on a live account.
How to Make MetaTrader Backtests More Realistic
Real ticks, realistic spread and costs, deliberate slippage and out-of-sample discipline — closing the gap between tested and live results.
Why Live EA Results Differ From Backtests
Spread, slippage, latency, data and downtime — the structural reasons live EA results diverge from the Strategy Tester.
Related free tools
Free, no login required.
Related NuvoraSync features
Sources & further reading
- MetaTrader 5 — Strategy Tester for automated trading — official overview of the MT5 tester, tick modelling modes and optimization.
- MetaTrader 5 Help — Strategy Tester report — definitions of the statistics and quality metrics shown in a test report.
Want to analyze your own MetaTrader account data automatically?
NuvoraSync is a read-only MetaTrader journal and analytics workspace. Connect MT4 or MT5 once and your trades, drawdown and performance update on their own — no manual entry, no signals, just your own data.
This article is for educational purposes only. It does not provide trading signals, investment advice, financial recommendations, broker recommendations or trade execution. Backtest results are historical simulations and do not predict future performance.