Data study
MT5 Strategy Tester accuracy: real ticks vs synthetic, and why backtests disagree
Tommy J.Founder, RoboticEAIf you have ever run the same Expert Advisor through the MetaTrader 5 Strategy Tester twice, on two different price histories, and watched the equity curve change shape, you have met the most common reason a backtest “differs”: the tester can only replay the price path it is handed. We checked how much that matters by running 100 strategies through both RoboticEA’s engine and the MT5 Strategy Tester, first on a tick stream built from bars, then on 24,596,614 real ticks.
The short answer
The short version
Why your MT5 backtest differs from someone else’s
A Strategy Tester run has three inputs that people rarely write down: the price path the tester replays inside each bar, the costs charged on it, and the account model that books the trades. Change any one and a strategy that looked identical on a chart will not produce the same trades. This post is about the first, because it is the one that is invisible in the report and the one we could measure cleanly.
The tester offers modelling modes that differ in where the ticks come from. “Every tick” builds them from bar data; “Every tick based on real ticks” replays recorded ticks. We measured a bar-derived stream that our own tooling wrote and a real-tick stream, so treat what follows as evidence on bar-derived versus real, not as a measurement of the tester’s built-in generator, which we did not test. The tester did exactly what it was asked in both cases, and that is the point: MetaTrader 5 is a faithful replay engine, and a replay is only as informative as the tape.
8.97 pp → 6.07 pp
median gap in total return between the RoboticEA engine and the MT5 Strategy Tester, bar-derived ticks then real ticks
97 strategies present in both runs, gap = engine minus MT5 in percentage points of return. Within 5 pp of each other: 34% of strategies before, 46% after. The MT5 result itself moved by a median 7.75 pp between the two tick models.
What the tester is fed
Four points per bar, or 24,596,614 ticks
The first run gave MT5 a custom EURUSD symbol whose only history was bars. To let the tester run in its tick-based mode, our importer wrote four points per five-minute bar — open, high, low, close, in that order, a quarter of the bar apart — with the ask a fixed two points above the bid. That is 48 points per hourly bar, and the tester’s journal confirmed it: 273,200 ticks over 5,695 bars, or 47.97 per bar. The second run replayed real Dukascopy ticks, loaded into a custom symbol, with the spread each tick actually carried.
Real EURUSD does not look like that. In the same window a typical five-minute bar held 283 ticks (mean 360), and only 0.2% of bars held four or fewer. An hourly bar held a median 3,461. The count also swings through the day, from about 1,151 ticks in the 21:00 UTC hour to about 10,074 at 14:00 — and the spread swings with it, averaging 1.38 pips at 21:00 against a median of 0.30 pips overall. A fixed spread cannot represent that, and a flat 48 points a bar cannot represent any of it.
| UTC hour | Ticks / H1 bar | Mean spread (pips) | UTC hour | Ticks / H1 bar | Mean spread (pips) |
|---|---|---|---|---|---|
| 00:00 | 2,735 | 0.34 | 12:00 | 7,502 | 0.30 |
| 01:00 | 3,454 | 0.33 | 13:00 | 9,319 | 0.30 |
| 02:00 | 2,758 | 0.34 | 14:00 | 10,074 | 0.30 |
| 03:00 | 2,190 | 0.34 | 15:00 | 7,737 | 0.30 |
| 04:00 | 1,908 | 0.33 | 16:00 | 5,133 | 0.30 |
| 05:00 | 2,598 | 0.35 | 17:00 | 3,939 | 0.30 |
| 06:00 | 4,141 | 0.31 | 18:00 | 4,077 | 0.32 |
| 07:00 | 6,040 | 0.30 | 19:00 | 3,797 | 0.33 |
| 08:00 | 6,027 | 0.30 | 20:00 | 2,463 | 0.39 |
| 09:00 | 5,046 | 0.30 | 21:00 | 1,151 | 1.38 |
| 10:00 | 4,277 | 0.30 | 22:00 | 1,487 | 1.17 |
| 11:00 | 4,324 | 0.29 | 23:00 | 1,442 | 0.47 |
For a concrete week, take Monday 6 to Friday 10 March 2023: 671,703 real ticks, where a four-point stream would offer 5,660. Everything a strategy does between the four points — whether a stop was touched before a target, what a fill cost — is decided by the stream, not by the strategy.

The test
100 strategies, two tick models, one price file
- Same strategies, both tools. 100 strategies from RoboticEA’s library (presets, composed strategies and stateful sizing and basket families), each run in the C++ engine and exported as an Expert Advisor and run in the MT5 Strategy Tester.
- Same window and account. EURUSD H1, 2023-02-01 to 2023-12-31, $10,000 deposit, leverage 1:100, seed 42. Swap and commission were zero on both sides so a cost difference could not hide a fill difference.
- Same tick file in the real-tick run. Both legs consumed one file of 27,553,506 Dukascopy records. 24,581,968 fall inside the window; MT5 reported 24,596,614, a 0.06% difference. Each side then builds its own candles from those ticks, as a live terminal does.
- Every row is on disk. The figures on this page are recomputed from the raw run records by a script, and the published /parity-study table is the same 100 rows, gap for gap.
On real ticks, the median absolute gap in total return was 6.06 pp across the 98 strategies that traded on at least one side (2 took no trades in either tool). The headline figure of 6.07 pp above is the same data on the 97 strategies that also ran on the bar-derived stream, no-trade rows included; a slightly different row set, not a different result. The spread of outcomes matters more than the median, so here are the deciles, then the same strategies on the bar-derived stream beside them.
| Within | Bar-derived ticks | Real ticks |
|---|---|---|
| 1 pp | 11% | 17% |
| 2 pp | 18% | 27% |
| 3 pp | 22% | 37% |
| 5 pp | 33% | 45% |
| 10 pp | 54% | 66% |
| 20 pp | 81% | 88% |
The engine and the tester also agree on which strategies did well: across the 98 strategies the correlation between the two total returns is 0.92, and they agree on whether the strategy finished up or down for 89 of them.
6.06 pp
median absolute return gap, real ticks
47%
of strategies within 5 pp of the tester
67%
within 10 pp
90.31 pp
the single worst gap
Read that as agreement of the same order of magnitude, not identity. The worst gaps are concentrated in strategies whose result compounds: the median gap was 3.65 pp where the MT5 return was under 20% in size (66 strategies) and 12.58 pp where it was 20% or more (32). Stateful strategies, whose position size reacts to earlier trades, had a lower median gap (3.14 pp against 6.18 pp for the rest) but the fattest tail.
| Strategy | Engine | MT5 | Gap | Trades (engine / MT5) |
|---|---|---|---|---|
| Protective Stop 002 | +269.2% | +178.9% | +90.31 pp | 124 / 115 |
| Anti-Martingale 002 | +89.8% | +42.6% | +47.22 pp | 136 / 128 |
| Quartz Deepening-Liquidity VIDYA Cross | +109.7% | +63.6% | +46.07 pp | 82 / 79 |
| Cinder Bandwidth Squeeze (Trend) | +37.8% | −4.4% | +42.28 pp | 114 / 111 |
| Drift Connors Split (Marathon) | +93.2% | +61.0% | +32.13 pp | 166 / 174 |
| Cinder TTM Squeeze MACD histogram Release (K1.5 BB20) | +73.0% | +100.4% | −27.34 pp | 144 / 141 |
The reasons attached to those rows in the run record are mundane: a stateful sizing strategy where one different fill is amplified, a volume-reading strategy, or a large compounded return that turns a small fill difference into many points. One row has no cause we could measure, and we say so rather than inventing one.
Test a strategy the way you will run it
Build a strategy, see its per-year record and drawdown, then export readable MQL5 and run it in your own MetaTrader 5 tester. Free tier, no card.
One cause, three symptoms
Three symptoms that turned out to be the same thing
Before the real-tick run we had three separate anomalies on the books, each with its own theory. All three moved when only the tick stream changed.
1. Stops that filled at the wrong price
In a four-point stream, a price between the open and the high has nothing to fill against, so the tester fills such a stop at the bar's extreme instead. Across the paired strategies the median bias (engine minus MT5) fell from +4.92 pp to +1.59 pp, the engine was the higher of the two on 67 strategies before and 60 after, and 55 of 97 strategies were closer to the tester on real ticks. The clearest single case, preset x25 oscillator stoch kd cross regime eurusd rr2: engine +69.0% against MT5 +9.3% on the four-point stream (+59.64 pp), and +39.3% against +39.4% on real ticks (−0.08 pp).
2. A tick-volume series that was a constant
Volume-reading indicators use the tester’s tick count. A four-points-per-bar stream makes that count 48 for every hourly bar, so a volume indicator sees a flat line. The strategies that read volume (11 of them traded on at least one side) had a median gap of 18.35 pp against 7.26 pp for the rest on the bar-derived stream, a penalty of 11.09 pp. On real ticks it was 8.42 pp against 5.95 pp, a penalty of 2.47 pp: 78% of it gone, not all of it. What remains is plausibly a different volume series (recorded size in our engine, tick count in the tester); we have not confirmed that.
3. Grid strategies that made impossible money
On the bar-derived stream, 10 grid strategies returned between +190% and +5508% in the MT5 tester while the engine, on the same strategies, reported between −44% and +32%. A grid adds to a position as price moves against it and closes the basket on a small retracement. One plausible mechanism is that a stream visiting the high before the low inside every bar hands it a tidy retracement after every excursion; we saw the effect, and did not isolate that mechanism.
| Grid strategy | MT5, bar-derived | Engine | Engine minus MT5 |
|---|---|---|---|
| grid_003 | +565.73% | −17.84% | −583.57 pp |
| grid_004 | +4963.23% | +32.17% | −4931.06 pp |
| grid_005 | +866.60% | −5.96% | −872.56 pp |
| grid_007 | +265.47% | −2.59% | −268.06 pp |
| grid_008 | +1097.07% | −23.12% | −1120.19 pp |
| grid_009 | +2195.16% | −25.50% | −2220.66 pp |
| grid_010 | +189.96% | −13.56% | −203.52 pp |
| grid_011 | +275.75% | −6.46% | −282.21 pp |
| grid_012 | +329.32% | −26.17% | −355.49 pp |
| grid_014 | +5508.42% | −43.97% | −5552.39 pp |
Only two of those grids have a real-tick MT5 report on disk. Both fall to ordinary losses:
| Grid strategy | MT5, real ticks | Engine, real ticks | Gap | Trades (engine / MT5) |
|---|---|---|---|---|
| grid_007 | −8.1% | −9.6% | −1.51 pp | 530 / 475 |
| grid_011 | −12.5% | −13.9% | −1.41 pp | 576 / 510 |
Two strategies are not a distribution, and we are not claiming one. What they show is direction: the absurd figures were a property of the stream, and they disappear when the stream is real.
The result we did not expect
Exact trade counts fell while the money got closer
On the bar-derived stream, the engine and the tester took exactly the same number of trades on 43 of 97 strategies. On real ticks that dropped to 5. If you judge agreement by trade count, the real-tick run looks much worse. If you judge it by money, it is better. Both are true, and they are the same fact.
| Trade-count gap | Bar-derived ticks | Real ticks |
|---|---|---|
| exact | 43% | 3% |
| within 1 | 67% | 11% |
| within 2 | 75% | 21% |
| within 5 | 86% | 50% |
| within 10 | 92% | 81% |
| within 20 | 94% | 96% |
The mechanism is simple. When both tools replay the same coarse path, they evaluate every signal on the same bar closes and reach the same decisions by construction — and the same coarseness is what mis-fills the stops, so the two agree with each other and both are wrong about the money. On real ticks, each tool builds its own candles from a very large tick set (the two counts differ by 0.06%), a marginal signal can land on either side of its threshold, and the trade lists drift apart while the fills become realistic. Even the price a candle is built from matters: building the engine’s bars from the mid rather than the bid, which is what the tester charts, took exact matches from 5 to 9 of 100 while making the money gap worse (6.84 pp against 5.95 pp).
There is also a residual we cannot explain from the records: on real ticks the engine took more trades than the tester on 88 of the 95 strategies where the counts differed. The direction is consistent, so it is probably systematic, and we have not found its cause.
43 → 5
strategies with an exact trade-count match, bar-derived then real ticks
Out of 97. Meanwhile the median return gap fell from 8.97 pp to 6.07 pp. Agreement on trade count was never the goal: a real account experiences fills and money, not a tally of trades.
Honest limits
What this does and does not prove
- One instrument, one timeframe, one window. Every row is EURUSD H1, 2023-02-01 to 2023-12-31, one seed, one $10,000 account, on a curated 100-strategy set. Nothing here speaks to gold, indices, other timeframes or other years.
- Agreement with MT5 is not proof of live fills. It shows two simulators agree when fed identical ticks. Both legs used Dukascopy ticks; your broker’s feed, spreads and slippage differ, and a live account will differ again.
- About 6 pp is the honest number, not one point. Only 47% of strategies were within 5 pp of the tester. Use the engine to rank and stress strategies, and the tester to confirm before you trust a number.
- One suspect row. preset_x25_mean_reversion_williams_cci_double_extreme_eurusd_rr2 shows the widest trade-count gap. An earlier audit found that row contaminated by tester-container reuse, so the MT5 side of it is probably a harness artefact. It was not re-run for this post; leaving it out moves the median to 6.05 pp.
- The volume set is a classification, not a proof. The strategies flagged as volume-reading come from an earlier audit’s list rather than a fresh read of every spec.
- Earlier boards looked tighter. Boards we published earlier showed smaller gaps under a different, bar-fed set-up. We could not reconcile them with the run records that remain, so we do not quote them.
Practical
A checklist for trusting a backtest
- Read the tester journal before the report. It states how many ticks and bars were generated. A count near 48 per hourly bar means the run replayed roughly four points per five-minute bar, not recorded ticks.
- Choose the real-ticks model when you want fills to mean something. In our harness the tester’s real-ticks mode on a custom symbol that held only bars produced no trades at all, so if a run comes back empty, check the tick history before the strategy.
- Charge the spread the instrument really had. On the ticks we used it averaged 0.34 pips, 1.30 at the 99th percentile, and 1.38 in the 21:00 UTC hour. A constant will flatter or punish a strategy depending on when it trades.
- Set swap, commission and account type deliberately. We zeroed swap and commission on both sides to isolate the tick effect. Baskets and grids are booked per leg on a hedging account, so compare their returns, not their trade counts.
- Be careful with volume indicators. They read tick counts, which are only meaningful when the ticks are real.
- Run it twice and treat the spread as your error bar. The same MT5 strategy moved a median 7.75 pp between the two tick models (the largest move was 121.6 pp). A single tester run is one draw.
RoboticEA is built around that loop: backtest with a per-year record and the drawdown beside every return, export readable MQL5, then confirm in your own MetaTrader 5. See how the workflow fits together, the full parity study table, and start free.
FAQ
MT5 tester accuracy, answered
Why does my MT5 backtest differ from another run of the same EA?
Most often because the two runs replayed different price paths. The tester replays whatever tick history it is given, and the path inside each bar decides whether a stop or a target is hit first and at what price. In our test the same MetaTrader 5 strategies moved by a median 7.75 percentage points of total return between a tick stream built from bars and a real-tick stream, with the largest move 121.6 points. Costs (spread, swap, commission) and the account model (hedging or netting) are the other two inputs worth checking.
What is the difference between synthetic ticks and real ticks in the MT5 Strategy Tester?
Synthetic ticks are manufactured from bars; real ticks are recorded quotes. In our first run the only price history was bars, so our importer wrote four points per five-minute bar (open, high, low, close), which gave the tester 273,200 ticks for the window. The real-tick run replayed 24,596,614, about 90 times as many. A real five-minute bar held a median 283 ticks and a real hourly bar a median 3,461, against 48 for the synthetic stream. We measured a bar-derived stream and a real one; we did not test the tester's own built-in tick generator.
How accurate is the MT5 Strategy Tester on real ticks?
Accurate enough to rank and stress strategies, not accurate enough to treat one run as exact. Running 97 strategies through both the MT5 tester and RoboticEA's engine on the same real ticks, the median gap in total return was 6.07 percentage points, down from 8.97 on a bar-derived stream, and 46% of strategies landed within 5 points of each other. That is agreement between two simulators on one instrument (EURUSD, H1, 2023-02-01 to 2023-12-31), not proof of live fills.
Why does my grid or martingale EA show huge returns in the tester?
One documented cause is a tick stream that is too coarse. On the four-points-per-bar stream, 10 grid strategies returned between +190% and +5508% in the MT5 tester, while the engine, on the same strategies, reported between -44% and +32%. Two of them have a real-tick MT5 report, and there the same strategies returned -8.13% and -12.54%. Two strategies are not a distribution, but the direction is clear: an implausible grid result is worth re-running on real ticks before you believe it.
Why is tick volume (iVolume) constant in my backtest?
If the tester replays four synthetic points per five-minute bar, every hourly bar has exactly 48 of them, so tick volume is flat. We measured 47.97 ticks per hourly bar in the tester journal. On strategies that read volume, the median gap to the engine was 18.35 percentage points against 7.26 for the rest, a penalty of 11.09; on real ticks the penalty fell to 2.47. Real ticks make the count meaningful.
Why did exact trade-count matches fall when we switched to real ticks?
Because agreement on trade count and agreement on money are different things. On the bar-derived stream both tools walked the same coarse path and reached the same decisions by construction: 43 of 97 strategies took exactly the same number of trades, but the money gap was larger (8.97 percentage points median). On real ticks each tool builds its own candles from millions of ticks, marginal signals flip, and exact matches fell to 5 while the median money gap fell to 6.07.
Does matching MT5 mean my backtest will match live trading?
No. Matching the tester shows two simulators agree when fed identical ticks; it does not model your broker's feed, spreads, slippage or requotes. Even on identical real ticks the gap was not zero: a median 6.06 percentage points across the 98 strategies that traded, with 67% within 10 points and a worst case of 90.31. Our test covered one instrument, one timeframe and one window, with both sides using the same Dukascopy ticks. Treat a backtest as evidence to test further, not a forecast.
Keep reading
Do forex robots actually work?
The prior question, over the same engine: how often an automated strategy survives at all.
The best timeframe for an EA
How trade frequency multiplies the spread, measured across every timeframe.
Best forex pairs for expert advisors
What each instrument charges a strategy, and why a best-pair ranking does not transfer.
Getting a free expert advisor for MetaTrader 5
Generate, validate and export readable MQL5 source without a black box.

