Backtesting
Why Your Expert Advisor's Live Results Differ From the Backtest: Eleven Causes and How to Check Each
By Benjamin Lee · Updated · 6 min read
The backtest looked excellent. The live account is flat or losing. Almost every EA trader meets this gap, and it feels like being cheated, whether by the seller, the broker or the tester. Sometimes one of them is at fault, but more often the cause is ordinary: costs the test did not charge, fills the tester could not model, or settings that were fitted to the past. This guide lists eleven causes of the gap, shows how to check each, and gives a process to find out which one is yours and what to do about it.
Key takeaways
- A gap between backtest and live is normal. A big, persistent gap has a cause you can find.
- Start with costs: spread, commission, swap and slippage are the most common culprits.
- Check that live trades match what the backtest would have taken on the same days.
- Overfitting is the hardest cause to see. Test on unseen data and forward test on demo.
- Fix one cause at a time and measure the change.
Expect some gap
A backtest is a model. It replays past prices with assumptions about costs and execution. The live market adds friction that the model approximates. Even a perfect EA would show a little less profit live than in a clean test. The question is how big the gap is and whether it is stable. A small steady gap is cost. A large or growing one points to a specific cause. Our guide on how backtests can mislead covers cases where the test itself was built to flatter.
Eleven causes, in the order to check
| # | Cause | How it shows up | How to check |
|---|---|---|---|
| 1 | Spread wider than tested | Many small trades lose more than the test | Compare live spread at entry with the test's spread |
| 2 | Commission and swap | A steady drag on every trade | Add them to the tester; check swap on held trades |
| 3 | Slippage and delay | Fills worse than the requested price, especially in news | Compare entry prices with the signal price; test with delay |
| 4 | Different data | Trades appear or vanish versus the test | Backtest on your broker's real ticks |
| 5 | Wrong settings or setfile | Different lot, stops or filters | Compare live inputs with the tested ones |
| 6 | Different timeframe or symbol | Strategy behaves differently | Match the manual |
| 7 | Account type | Hedging, netting, leverage or execution differ | Test on the same account type |
| 8 | Server time difference | Session filters shift by hours | Check the time inputs against server time |
| 9 | Missing news filter in the test | The tester traded through news the live filter avoids | Compare with a time-based pause |
| 10 | Overfitting | Test is great, live is poor from the start | Test unseen periods; walk-forward |
| 11 | A regime change | Worked for years, fails recently | Test the most recent months separately |
Causes 1 to 3: costs and fills
These explain most gaps for short-term EAs. Take a scalper with a 4 pip average target on EURUSD. If the test used a 0.2 pip spread and no commission, and the live account has a 1.2 pip spread, one full pip of the 4 is gone on every trade. That is a quarter of the gross edge. Slippage adds more. A strategy that depends on tiny margins can turn from profitable to unprofitable with that change alone. The account types guide shows a worked example, and spread, slippage and swap explains each cost.
- Record the spread and the fill price of each live trade for a few weeks, and compare with the test.
- Use real ticks in the tester, with a realistic delay, as in the tester settings guide.
- Add commission and, for held trades, the swap values from the symbol specification.
Causes 4 to 9: setup differences
These are mistakes or mismatches rather than market effects. Pull up the live trades for a week and run the backtest for the same dates on your broker's data. Place both lists side by side. If the backtest takes trades the live EA did not, or the reverse, look at what differs: the time filter, a news filter, a spread cap, the symbol, the lot, the account mode. The trade list is the best diagnostic you have. Comparing it takes an hour and often finds the cause.
Step 1: Export live trades for a recent week
Use the History tab. Note times, symbols, directions, sizes and prices.
Step 2: Run the backtest for the same week
Same EA, same inputs, real ticks, your costs and delay. Save the trade list.
Step 3: Match trade by trade
Find trades present in one list and missing in the other.
Step 4: Explain each difference
Time zone, spread filter, news filter, rejected order, different input or data.
Step 5: Fix the largest difference first
Then repeat for another week to see if the fix holds.
Causes 10 and 11: the hard ones
If the live results are poor from the first weeks and trade-by-trade matching finds nothing, the settings may have been tuned to the past. Optimisation picks what fit best, including luck. Check this by testing a period the settings were not tuned on, and by running a walk-forward analysis, as in our walk-forward guide and the overfitting guide.
A regime change is different: the EA worked for years and then stopped. Markets move between trending, ranging, calm and wild phases. A trend EA suffers in long ranges, a mean-reversion EA in strong trends. Test the last few months on their own. If the EA loses in the tester over the same months, the market has changed, not the EA's execution. Then decide whether to pause, reduce size or wait, with the rules in what to do when your EA is in drawdown.
Closing the gap
| Finding | Action |
|---|---|
| Costs larger than the test | Rerun the test with true costs. Change account type or broker if the edge disappears |
| Slippage on news | Add a news pause, cut size around events |
| Setup mismatch | Correct the inputs, time zone or symbol, and retest |
| Data difference | Test on your broker's real ticks; compare with another source |
| Overfitting | Reduce optimised inputs, choose stable settings, forward test; consider a different EA |
| Regime change | Reduce size, pause or wait; do not re-optimise on the latest weeks |
If the EA was bought on the strength of a backtest alone, our buying checklist and the guide on verifying a track record describe the evidence to ask for. The full routine is in the MT5 Expert Advisors guide.
Sources and further reading
- MetaTrader 5 Help: Strategy TestingThe Strategy Tester: testing modes, settings and forward testing.
- MetaTrader 5 Help: Real and Generated TicksThe difference between ticks recorded from the broker and ticks the tester generates.
- MetaTrader 5 Help: Testing ReportWhat each figure in the tester's report means, including drawdown.
- Bailey, Borwein, López de Prado and Zhu: Pseudo-Mathematics and Financial Charlatanism (Notices of the AMS, May 2014)A plain-language account of how backtest overfitting produces strategies that fail out of sample.
Frequently asked questions
Why is my EA losing live when the backtest was profitable?
Common causes are higher live spread and slippage than tested, commission and swap, setup mismatches, different data and overfitting. Compare live trades with a backtest of the same week to find the difference.
How big a gap between backtest and live is normal?
Some gap is normal because of costs and execution. A small, steady gap is expected. A large or growing gap has a specific cause that you can find.
Is the seller lying if live results differ from the backtest?
Not necessarily. Costs, execution and market changes explain most gaps. If the seller's test used unrealistic spreads or hid drawdown, that is a problem, so ask for details.
How do I test whether my EA is overfitted?
Run it on a period the settings were not tuned on, use walk-forward analysis, and forward test on demo. If results collapse out-of-sample, it was probably fitted to the past.
Should I re-optimise after poor live results?
Be careful. Optimising on the latest weeks usually fits noise. Diagnose the cause first, and if you do re-optimise, test on unseen data and demo before going live.
Expert Advisors in these styles
Apply the checks above to any of these before you buy: read the manual, run your own backtest, and start on demo.
Keep reading
- BacktestingHow to Backtest an EA in MT5 ProperlyLearn how to backtest an Expert Advisor in MT5 the right way: tester modes, spreads, delays, optimisation, walk-forward checks and the red flags to avoid.
- BacktestingHow to Read an MT5 Backtest ReportLearn to read an MT5 Strategy Tester report line by line: drawdown, profit factor, Z-score, trade quality, robustness checks and the red flags that expose a weak EA.
- BacktestingMT5 Strategy Tester Settings Explained, Field by FieldEvery MT5 Strategy Tester setting explained: modelling mode, date range, forward, delay, deposit, leverage and optimisation, with the safest choice for each.
- Pillar guideMT5 Expert Advisors: The Complete Guide for BeginnersEverything about MetaTrader 5 Expert Advisors in one place: how they work, strategy types, risk, backtesting, buying safely, gold, EURUSD, prop firms and Europe.


