ExecGuard

MT5 backtest vs live

Why your EA live results do not match the MT5 backtest

The equity curve in the Strategy Tester climbed. Same EA, same inputs, same symbol on a live account, and the curve is flatter, noisier, or upside down. Before you rewrite the strategy: the gap has two completely different sources, and only one leaves a trace in your trade history.

Two different problems wearing the same symptom

"Backtest good, live bad" is one sentence describing two unrelated failures.

The first is an execution problem. Your EA took the trades it was supposed to take, at the moments it was supposed to take them, and each one simply earned less than the test assumed. The signal logic was right; the fills were worse. That gap is measurable, because every element of it - the price you asked for, the price you got, the spread at that instant, the send-to-fill time, the commission - is recorded per trade.

The second is a modelling problem. Your EA did not take the same trades at all, or took them for reasons that only existed inside the test. No amount of execution data will tell you this, because the evidence is not in your fills - it is in how the test was built.

Almost every article on this subject blends the two into one list of "reasons your backtest lies." That blending is why the question never gets settled. Split the list and it becomes answerable.

The half your execution data can evidence

These causes share one property: they show up as a difference between what your EA requested and what the trade server returned, and they are recorded per trade whether or not anyone is looking.

Slippage on entry and exit

The difference between requested and filled price. The most familiar cause, and the most commonly underestimated, because traders treat it as an entry problem. Exits matter as much: a stop or target filling a fraction of a pip worse, on every trade, on both sides, compounds into a number that looks nothing like the per-trade figure. Slippage is also asymmetric on many accounts - the negative tail is longer. An average hides that; a distribution does not. More on measuring slippage on MT5.

Spread at the moment of fill versus modelled spread

Your test used one spread assumption. Your live fills happened at whatever the spread actually was in that second. If your strategy trades the session open, scheduled news, or rollover, the spread it paid live may bear no resemblance to the test's - and since spread is paid on entry and exit, a small average win is disproportionately exposed. Recording spread at entry and exit, per trade, turns this from a suspicion into a column you can sum.

Send-to-fill time

The interval between your EA sending the order and the server confirming the deal. On a VPS beside the broker's data centre this can be tens of milliseconds; on a home connection in a volatile session, far more. What matters is not the headline number but what price did during that interval - a breakout entry is far more sensitive to it than a pullback into a level. More on measuring send-to-fill time.

Requotes and rejected sends

A backtest has no trade server on the other side, so nothing ever answers "no". Live, an order can come back as a requote or an off quote, and what happens next is up to your EA's error handling: retry worse, retry late, or skip. A skipped trade is invisible in a PnL comparison - it looks like the strategy did not fire - but it is a real divergence, and the return codes are logged.

Commission, fees and swap

If the symbol specification your test ran against carried no commission, the test ran without one - and if your live account is raw-spread with a per-lot charge, every trade in the comparison is already mispriced. Swap is the same story with a longer fuse: charged overnight, tripled on one day of the week, and both the rate and that day can change while your EA keeps running.

The half no execution log can settle

These are real, common, and frequently the larger share of the gap. None can be diagnosed from fill data, because the fills were fine - the test was wrong before a single order was sent. That is why the split matters: execution causes are fixable by changing broker, account type, order type, hosting or timing, while modelling causes are only fixable by changing the strategy or how it was validated.

Overfitting

The parameters were selected because they performed well on the history you tested. Enough optimisation passes and any parameter set looks excellent on the sample it was chosen from. Walk-forward and out-of-sample testing address this. Fill data cannot.

Look-ahead bias

The EA used information unavailable at the moment it acted - a bar that had not closed, an indicator buffer only complete in hindsight, higher-timeframe data resolving later. Live, that information is not there yet, so the same code takes different trades.

Survivorship and data selection

The history you tested was chosen, consciously or not - a symbol that trended over the period you picked, a range starting after the drawdown, a feed with gaps filled in. The test measured that selection, not the market.

Regime change

Volatility, correlation and the behaviour of the level your strategy relies on all change. A strategy tuned to a range-bound period does not stop working because of your broker. It stops because the market stopped doing the thing it was tuned to.

Insufficient sample

Forty live trades cannot disprove a backtest containing four thousand. If your edge is small relative to its trade-to-trade variance, the live sample may be entirely consistent with the test and simply too short to show it. This is the most common reason a gap is nothing at all.

What the MT5 Strategy Tester actually models

The modelling mode you choose changes how faithfully the price path is reconstructed. It does not change the fact that a test replays prices rather than sending orders to a counterparty. Both halves of that sentence matter.

Every tick based on real ticks

The most faithful mode available. It replays the tick history your broker supplies, including the bid and ask recorded in those ticks - so the spread your test pays is a recorded one rather than an assumption. Its limits are the limits of that history: how far back it goes, how complete it is, and the fact that it is your broker's record, not a neutral one. Two brokers, two tick histories, two different backtests from identical code.

Every tick

Ticks are generated from minute bars rather than replayed. The path between the open and close of each minute is a plausible reconstruction, not an observed one. For entries and exits sitting far from the intrabar noise this is often close enough. For anything triggering on a level touched inside the minute, the reconstruction is doing the work, not the data.

1 minute OHLC

Only the open, high, low and close of each minute bar are used as control points. Everything between is inferred, including the order in which the high and the low were reached. A stop and a target inside the same bar are resolved by a rule, not by evidence. Fast and useful for a first pass; not a basis for concluding that live execution is at fault.

What no modelling mode reproduces

The tester also exposes a delay setting - zero latency, a random delay, or a fixed number of milliseconds you type in. Set it deliberately, but be clear: it is one number, applied uniformly, chosen by you. Your live account produces a distribution, with a tail, varying by session and symbol.

The honest statement is narrower than the popular one. It is not that the Strategy Tester is optimistic - it is that it reproduces the configuration you gave it. It has no trade server to queue your order and no counterparty to answer it. That is not a flaw; it is the boundary of what a simulation can be, and exactly the boundary a live execution record fills in.

How to measure the execution-side gap on a live account

The goal is a number: how much of the difference between test and account is accounted for by fills. Every step below uses data MT5 already produces.

  1. Re-run the backtest over exactly the live period. Same symbol, same inputs, same modelling mode, same date range as your live trading - not the original test window. Comparing against a different period compares two markets, not two executions.
  2. Match the trades, not the totals. Line up test trades and live trades by signal time. This is the step that does the diagnostic work, and it is the step almost everyone skips.
  3. Record requested versus filled price on every live trade, entry and exit separately, converted to account currency so the numbers are addable.
  4. Record the spread at entry and at exit, and compare each against the spread your test charged for that trade. The difference, in account currency, is a second column.
  5. Record send-to-fill time per order, keeping the distribution rather than the average. The tail is where the cost lives.
  6. Record commission, fees and swap actually charged, and subtract what the test charged. On a raw-spread account this alone can be most of the gap.
  7. Add the columns and compare against the total gap. You now have an execution cost in the same units as the discrepancy.

How to tell which half of the problem you have

Step 2 answers the question almost on its own, before any cost is totalled.

Reading the comparison between matched backtest and live trades
What the comparison shows What it points at
Same trades, same times, each one worse Execution side. Total the columns above for the size of it.
Different trades, or trades the test took and the account did not Modelling side, or an error-handling path the test never exercised.
Same trades, summed execution cost explains only a small share Mostly modelling. The execution cost is real but not the story.
Same trades, similar per-trade results, gap inside normal variance Sample size. There may be nothing to explain yet.

One caution, plainly: a live sample of a few dozen trades will not settle much either way. Execution costs are steadier than strategy returns, so they emerge from the noise sooner - but sooner still means enough trades to see a distribution rather than anecdotes.

Questions traders ask

Does a better modelling mode close the gap?

It makes the price path more faithful, which removes one class of error - particularly for strategies triggering inside the minute. It does not add a counterparty, a queue, or your account's actual spread at the second you traded. If your gap is on the execution side, a more faithful tick model narrows the estimate without explaining the difference.

Is real tick data enough to trust a backtest?

It is the best input the tester accepts and worth using. It is still a record supplied by one broker, of finite depth, describing prices rather than fills. Treat it as a much better estimate, not a measurement of what your account will do.

How many live trades before the comparison means anything?

There is no single number - it depends on how large your edge is relative to its trade-to-trade variance. Stop comparing totals and start comparing distributions: if the live and test distributions of per-trade outcome overlap heavily, you do not yet have a difference to explain, however different the equity curves look.

Can execution data tell me my strategy is overfitted?

No. It can tell you whether your fills were materially worse than the test assumed, which is worth ruling out first. If the fills were fine and the trades matched, the problem is the strategy or the way it was validated - answered by walk-forward and out-of-sample work, not a fill log.

Related pages

Waitlist

We are building the measurement half of this

ExecGuard records per-trade execution data on MT5 accounts - requested versus filled price, spread at entry and exit, send-to-fill time, commission and fees - so the comparison above is a report rather than a weekend of spreadsheets. The tracking EA will be published in full, so you can inspect exactly what is recorded and how each metric is derived.

It is not open to everyone yet, and the waitlist is genuinely a waitlist: we are trying to learn which version of this problem people actually have before building more. If you join, tell us what you saw - the symbol, the size of the gap, and what you have already ruled out.