XAUUSD Robot

Backtest Profitable, Live Account Losing. Why?

By the XAUUSD Robot Team ยท Updated August 2026

Why an EA that backtested profitably loses money on a live account

TL;DR Work through these in order of likelihood. 1) Curve fitting — the settings were tuned until history looked perfect. 2) Spread — tested on an unrealistically tight value. 3) Slippage — the tester fills at the modelled price, your broker does not. 4) Tick data — a coarse modelling mode hid intrabar stop hits. 5) Symbol or broker mismatch — different spread, swap and history. 6) Regime change — the market stopped behaving the way the test period did. 7) Intervention — someone closed trades or changed settings mid-run. A gap of some size is normal; a total reversal usually means one of the first four.

Some gap is expected. A reversal is not.

Live results trailing a backtest slightly is normal and unavoidable — every simulation is optimistic about costs. What needs explaining is the other case: a backtest showing steady growth and a live account losing steadily on the same settings. That is not variance. Something specific is different, and it is usually one of seven things.

1. The settings were fitted to history

This is the most common cause by a wide margin. Optimisation searches thousands of parameter combinations and returns whichever performed best on that exact data. If the search space is large enough, something will always look excellent — not because it captured a real behaviour, but because it memorised the noise in that particular stretch of history.

The tell is a backtest that is too good: a smooth equity curve, an unusually high win rate, and results that fall apart if you shift the date range by a few months.

The test: run the same settings on a period the optimiser never saw. The Forward setting in the MT5 Strategy Tester does this in one run. If the forward half collapses, you have your answer.

2. The spread you tested is not the spread you trade

Leaving the tester's spread on “current” captures whatever it happens to be at that moment. Run it during a quiet hour and every trade is credited with a spread it would never have received during a session.

The effect scales with how often the advisor trades. A system taking one trade a week barely notices; a scalper taking twenty a day can have its entire edge consumed. The arithmetic is in what gold's spread really costs.

The test: rerun with the spread set 50% higher than your broker's typical figure. If profitability disappears, the edge was never larger than the costs.

3. Slippage, which the tester does not model

The Strategy Tester fills orders at the price it modelled. A live broker fills at whatever was available when the order arrived — which, during fast movement, is somewhere else.

This asymmetry is not random. Slippage tends to be worse precisely when the advisor most wants to act: at breakouts, around news, at the open. Stop-losses are hit at worse prices than modelled; entries fill later than modelled. Both work against you, which is why the direction of the gap is consistently unfavourable rather than even. Why fills beat backtests covers the mechanics.

4. The tick data was too coarse to be honest

If the test ran on anything other than real ticks, it did not see what happened inside each candle. On gold, where a single hour can travel more than a currency pair moves in a day, that matters enormously.

A stop-loss reached at 14:23 and recovered by 14:31 is a loss in reality and, in a coarse modelling mode, may never register at all. The backtest records a winner. Repeat that a few dozen times across a test and the equity curve is fiction.

The test: rerun on Every tick based on real ticks and compare. If the result changes materially, trust the new one.

5. Different broker, different instrument

Testing on one broker's data and trading on another's is testing a different instrument. Spread structure, swap rates, execution model, even the symbol's price history all differ. Gold specifically varies more between brokers than most instruments.

The symbol suffix is worth checking too: XAUUSD and XAUUSD.m are separate symbols with separate histories, and a test run on one says less than it appears to about the other.

The fix: test on the account you will trade, using that broker's downloaded history.

6. The market changed

This is the honest, uncomfortable one. A ruleset derived from a trending period keeps executing faithfully into a ranging one. Nothing is broken; the condition the rules describe stopped occurring.

Gold is prone to this because its behaviour is driven by macro forces that shift in phases — a year of rate-driven trending looks nothing like a year of consolidation. An advisor built and tested through one can look inexplicably poor in the other.

There is no clever fix. What helps is testing across several distinct periods rather than one long favourable stretch, and accepting that a strategy has conditions it suits and conditions it does not.

7. Someone intervened

Worth stating plainly because it is common and rarely admitted. Closing a losing trade early, skipping a signal that felt wrong, nudging a setting after a bad week — each converts the tested system into a different, untested one.

The backtest measured the rules executing without exception. If the live account did not do that, the two are not comparable, and the comparison will keep failing until they are.

A diagnostic order that saves time

  1. Rerun with a forward period. Collapse there means fitting — stop, and rebuild.
  2. Rerun with real ticks and a realistic spread. If profit vanishes, the edge was inside the costs.
  3. Compare the symbol and broker against what you are trading live.
  4. Compare trade counts over the same window. Far fewer live trades usually means a filter or the symbol; far more usually means different settings.
  5. Check the Experts log for errors the backtest never encountered — requotes, insufficient margin, rejections.
  6. Only then consider regime change, because the first five are far more likely.

Questions we get

Why does my EA make money in backtest but lose live?

Usually curve fitting, then unrealistic spread, unmodelled slippage, or coarse tick data hiding intrabar stop hits.

How much difference between backtest and live is normal?

Live trailing somewhat is normal. A profitable test becoming a losing account points to a specific setup problem.

How do I know if my EA is curve fitted?

Test on unseen data with the Forward setting. Strong before and collapsing after means the settings were fitted.

Does slippage really change results that much?

For high-frequency systems yes โ€” it hits hardest at breakouts and news, working against entries and stops together.

Should I re-optimise when live results disappoint?

Rarely. Re-optimising on the disappointing period repeats the fitting mistake. Diagnose the cause first.

Can testing on a different broker cause the difference?

Yes โ€” spread, swap, execution and price history all differ by broker, and gold varies more than most instruments.

The verdict

A backtest is a claim about the past under assumptions you chose. When live results contradict it, the assumptions are the first place to look, not the market โ€” and in most cases a forward test, a realistic spread and real tick data will locate the problem within an hour. What survives all three checks and still disappoints is worth taking seriously as a regime question. What fails them was never a strategy.

Live account not matching the test?

Send us the backtest report and your tester settings and we will tell you which of the seven it is.

๐Ÿ’ฌ Talk to Us on Telegram

More from the lab

Risk & affiliate disclosure: Educational content only, not financial advice. Trading gold (XAUUSD), forex and CFDs carries substantial risk of loss; a large majority of retail CFD accounts lose money. No results are guaranteed. We may earn a commission if you open an account through partner links, at no extra cost to you โ€” this funds the free EA. See our Affiliate Disclosure.