EMA Crossover Strategy on Gold: What the Backtest Shows
The 9/21 EMA crossover is one of the most repeated setups on trading YouTube. The pitch is simple: when a fast average crosses a slower one in the direction of the 200 EMA, the trend has started and you ride it. The question worth asking is whether that holds up once spread, slippage and a fixed 1% risk per trade are applied over a long stretch of data.
The headline finding on gold is negative. On XAU/USD, 1h, from 2016-11-19 to 2026-11-19, the rules produced 1,194 trades with a profit factor of 0.95, which means it lost money after costs. The net return at 1% risk was -42.8%, with a max drawdown of 63.4%. The Nasdaq (NQ) was the only one of the three markets that finished positive in this test.
The rules we tested
Buy when the 9 EMA crosses above the 21 EMA and price is above the 200 EMA. Sell when the 9 EMA crosses below the 21 EMA and price is below the 200 EMA. Stop at 1.5x ATR. Target 2R.
Results
| Market | Trades | Win rate | Profit factor | Net | Max DD | Period |
|---|---|---|---|---|---|---|
| EUR/USD 1h | 1257 | 33.5% | 0.94 | -46.9% | -51.3% | 10y |
| XAU/USD 1h | 1194 | 34.3% | 0.95 | -42.8% | -63.4% | 10y |
| NQ 1h | 1070 | 36.4% | 1.12 | +103.3% | -25.5% | 10y |
1% risk per trade, spread and slippage included, entries at the next candle open, stop checked before target. Periods: EUR/USD 2016-11-19 to 2026-11-19 · XAU/USD 2016-11-19 to 2026-11-19 · NQ 2016-11-19 to 2026-11-19.
Equity (% at 1% risk per trade) on NQ 1h, 1070 trades.
What was tested and why
The rules are a trend-following entry. A long is taken when the 9 EMA crosses above the 21 EMA and price closes above the 200 EMA. A short is taken when the 9 EMA crosses below the 21 EMA and price closes below the 200 EMA. The stop sits at 1.5 times the 14-period ATR, and the target is 2R.
These are the rules as the engine read them: long when EMA(9) is rising through EMA(21) and the close is above EMA(200); short when EMA(9) is falling through EMA(21) and the close is below EMA(200); stop at 1.5×ATR(14); target at 2R. Nothing beyond these conditions was added. Entries are at the next candle open. If stop and target are both hit within the same candle, the stop counts first.
Each market was run on 1-hour candles over the same ten-year window. Spread and slippage are included, and risk is fixed at 1% of the account per trade.
Results by market
EUR/USD produced 1,257 trades with a win rate of 33.5% and a profit factor of 0.94. The average result per trade was -0.04R, and the net return at 1% risk was -46.9%, with a max drawdown of 51.3%. Longs (627) and shorts (630) were almost evenly split.
Gold (XAU/USD) produced 1,194 trades, a 34.3% win rate and a profit factor of 0.95. The average was -0.04R, with a net return of -42.8% and a max drawdown of 63.4%. Like EUR/USD, this is a losing result after costs, and the drawdown is deeper than the forex test.
The Nasdaq (NQ) produced 1,070 trades with a win rate of 36.4% and a profit factor of 1.12. The average was +0.08R per trade, the net return at 1% risk was +103.3%, and the max drawdown was 25.5%. This is the only market in the set where the rules made money, and it did so with the smallest drawdown of the three. With more than 1,000 trades on each market, none of these samples is small, though a backtest on one rule set still does not show what will happen next.
What stands out: years and direction
The yearly figures are uneven. On gold, 2017 was the strongest year at +34.0R, while 2018 (-28.7R), 2019 (-25.8R) and 2021 (-24.9R) were heavy losing years. Gold ended the decade below zero, but it was not a steady bleed. Results swung by several R from one year to the next.
EUR/USD had a similar pattern. 2021 (+26.8R) and 2024 (+10.6R) carried the test, while 2022 (-39.8R) and 2019 (-25.2R) did most of the damage. Long and short trades were close in count on both forex and gold, so the losses did not come from one direction alone.
The Nasdaq was more consistent. 2020 contributed +31.9R, and most years were positive, though 2021 (-12.5R) and 2024 (-5.2R) were down. Its longs (659) outnumbered its shorts (411), which fits an index that rose over most of this window, though this test does not isolate that effect.
Why it might behave this way
A crossover of two moving averages is a lagging signal. By the time the 9 EMA has crossed the 21 EMA, a good part of the move may already be done. The 200 EMA filter reduces counter-trend entries but does not stop whipsaws in ranges, where the averages cross back and forth and each false signal costs the stop.
A 2R target with a 1.5 ATR stop needs a win rate above roughly one in three just to break even before costs. Gold and EUR/USD both won around a third of trades, which sits right at that line. Costs push it under. That is a plausible explanation for the small negative averages, though it is an inference from the numbers, not something the test measured directly.
Gold's larger drawdown suggests its swings are sharper relative to the stop distance, so losing streaks hurt more. This is also an interpretation rather than a confirmed cause.
What to try next
Test the same rules on a longer or shorter timeframe, such as 4h or 15m, to see whether the result depends on the 1h candle. Changing only the timeframe is a clean way to check whether the edge is a feature of the rules or a feature of one chart.
Try the stop and target separately. A 1.5 ATR stop with a 2R target is one choice among many. Testing a 1R or 3R target, or a wider stop, shows how sensitive the average R is to those settings.
Check whether the 200 EMA filter matters at all by running the crossover without it. If the result is similar, the filter is not adding anything. You can run the same test yourself on WickCheck, using the same rules and costs, and compare your own variations side by side.
Takeaway. On this test, the 9/21 EMA crossover with a 200 EMA filter lost money on gold and EUR/USD after costs and made money on the Nasdaq. The gold result, with a profit factor of 0.95 and a 63.4% max drawdown, does not support the idea that this setup works on XAU/USD on 1h candles. The Nasdaq result is more encouraging, but it is one market over one ten-year window, and it should be tested across other periods and settings before anyone treats it as a finding.
Same rules on NQ. Change any word, a market or the dates and see what moves.
Terms used here
Questions
- Does the 9/21 EMA crossover work on gold?
- Not in this test. On XAU/USD 1h from 2016-11-19 to 2026-11-19, the rules produced 1,194 trades with a profit factor of 0.95, a net return of -42.8% at 1% risk, and a max drawdown of 63.4%. That is a losing result after costs.
- Why did the EMA crossover make money on the Nasdaq but not on gold?
- The test does not establish why. The Nasdaq had a profit factor of 1.12 and an average of +0.08R per trade, while gold was slightly below breakeven. Differences in volatility and trend behaviour may matter, but this backtest does not isolate those causes.
- Can I run this test myself?
- Yes. WickCheck lets you run the same rules, timeframe and cost settings on your own, so you can check the results and change the parameters to see how sensitive they are.
More tests
We backtested a previous day high low strategy with an FVG entry on ES, XAU/USD, EUR/USD and NQ. Two markets lost money after costs. See the numbers.
Asian Range Strategy: Does the London Sweep Hold Up?We backtested an Asian range sweep and fair value gap setup on EUR/USD, USD/JPY, GBP/USD and XAU/USD. Results were mixed, with one market profitable.
Order Block Strategy on the 1H Chart With a 200 EMA FilterWe backtested order block retests filtered by the 200 EMA on EUR/USD, GBP/USD, XAU/USD and NQ over 10 years. Costs included. Here is what held up.
Past results, real or simulated, do not guarantee future results. Not investment advice.