Research · In-depth

Where Does a Good-Looking EA Backtest Go in Real Conditions? 60 Textbook Strategies on 11 Years of Gold

The short version
  • We tested the moving-average crossover (EMA crossover), a textbook strategy at the core of many EAs, in 60 variations on real hourly gold prices, 2015–2026.
  • Costs eat the profit: the best variation earned only $1.40 per trade before costs. At $1.50 of spread plus slippage per trade, 11 years of profit becomes a loss.
  • The period you show changes everything: the best 9 months (Jun 2025 – Feb 2026) made 83% of the profit of the whole 11.75 years, while 2015–2019 combined lost money.
  • Every short-target scalping variation lost money, even with zero costs.

Why run the experiment ourselves

In How to Read an EA Backtest Report we explained what to look for in a report. This article works from the other side: we build the backtests ourselves and show how many ways the same system can be made to look good or bad, without faking a single number.

We chose a strategy everyone knows and that is not a secret, a fast moving average crossing a slow one, so anyone can reproduce it. (This article does not test the logic of any particular EA, including ours.)

Method

DataHourly XAUUSD, Jan 2015 – Sep 2026 (11.75 years)
SignalFast EMA (5, 8, 10, 13, 20, 30) crossing slow EMA (50, 80, 100, 150, 200): 30 pairs · entry at the next candle's open · one position at a time
Swing versionSL = 2 × ATR · TP = 3 × ATR · or exit on the opposite cross
Scalp versionSL = 0.5 × ATR · TP = 0.5 × ATR · or exit on the opposite cross
Candle touches both SL and TPCounted as SL first (pessimistic)
Standard cost$0.30 per trade (a typical Strategy Tester spread setting)
UnitsProfit in dollars per 0.01 lot (multiply by 10 for 0.10 lot)
Optimise / testBest settings chosen on 2015–2020, then checked on 2021–2026, which was not used for optimising

Finding 1: most textbook variations don't make money

In the optimisation period (2015–2020), only 4 of 30 swing variations were profitable. None of the scalp variations made money, in either period.

The best scalp variation lost $0.29 per trade on average before costs. After real costs it loses more. That is worth remembering when an EA advertises "small, frequent profits" on gold: the smaller the target per trade, the larger the share of it that costs take.

So if an EA claims to use just a crossover or a single basic indicator and shows beautiful profits every year, ask how its settings and test period were chosen.

Finding 2: cost per trade decides everything

The best swing pair was EMA 20 crossing EMA 80, trading about 81 times a year with an average gross profit of $1.40 per trade. Here is how its 11.75-year total changes with the cost per trade:

$0$400$800$1,200$1,334$0.00$1,047$0.30$760$0.60$378$1.00−$100$1.50Total 11.75-year profit by cost per trade (spread + slippage) · $ per 0.01 lot
Total 11.75-year profit of the same strategy by cost per trade ($ per 0.01 lot)
Cost per trade (spread + slippage)11.75-year totalvs zero cost
$0.00 (no costs)$1,334100%
$0.30 (typical tester setting)$1,04778%
$0.60$76057%
$1.00$37828%
$1.50−$100loss

Same system, same settings, same data. Only the cost per trade differs, and the result ranges from a nice profit to a loss. Real costs depend on the broker, account type, commission and timing; around news, gold spreads can widen several times (see Which News Really Moves Gold?).

How to use this: divide the report's net profit by the number of trades. If the result is close to your broker's real spread, the system is hanging by a thread.

Finding 3: pick the period, change the picture

$-200$0$200$400$600$800151617181920212223242526Net profit per year ($ per 0.01 lot, after $0.30 cost per trade) · 2015–2026 (2026 to Sep)
Yearly net profit of the EMA 20/80 swing strategy after $0.30 cost per trade

This strategy made $1,047 over 11.75 years. Look at where it came from:

  • 2015–2019: five years combined, a $87 loss
  • 2020–2024: five years combined, $118 profit (including a $269 year and a $172 losing year)
  • 2025 – Sep 2026: just over one year, $1,017

The best 9 months (June 2025 – February 2026) made $869, or 83% of the total. Show only that window and the strategy looks brilliant. Show only 2015–2019 and it looks worthless. It is exactly the same system.

The reason: trend strategies make money when the market runs one way for a long time, and gold rallied hard through 2025–2026. Any strategy looks smart in a market that suits it. The question to ask is how much it loses, and whether it survives, when the market doesn't suit it.

Finding 4: optimising guarantees nothing

We picked the best settings on 2015–2020 and looked at 2021–2026, which was not used for optimising:

  • In this experiment the best past pair (EMA 20/80) happened to stay the best in the new period too. We'll say plainly that this was better than we expected.
  • But of the 5 best pairs in the past, only 2 were still profitable in the new period. The other 3, which looked good during optimisation, lost money.
  • And the best pair's profit in the new period ($865) came entirely from the last year or so of strong gains; 2021–2024 combined lost $152. It did not come from consistency.

The lesson: an optimised backtest is the upper bound of what might happen, not what you should expect. A credible EA should show results for the optimisation period and the unseen period separately, and be profitable in both.

Summary: 4 questions for every EA backtest

  1. What is the profit per trade, and does the tested cost match reality? If profit per trade is close to the real spread, lower your expectations sharply.
  2. How was the test period chosen? Ask for every year, not just the best stretch, especially the years when the market did not suit the strategy.
  3. Are there results for data not used in optimisation? If only optimised results exist, those numbers are an upper bound.
  4. For small-target scalping systems, is there live-account evidence? These systems are the most cost-sensitive; backtests mean little without live results.

If you have a report file, try our free EA checker.

Limitations

  • This is the simplest textbook strategy, used to show how costs, period and optimisation affect results. It does not mean more sophisticated strategies behave the same way.
  • We used hourly candles, so moves inside the hour are approximated pessimistically (SL before TP).
  • Cost per trade is a fixed number; in reality spreads vary with time of day and market conditions.

This article is for educational purposes and is not investment advice. Trading gold and CFDs carries a high level of risk and you may lose all of your capital. Past performance does not guarantee future results.

VPS for gold EAs, 10% off the first month

Your EA has to stay on to see every bar close · why we point you here - affiliate link, same price for you