The exponential moving average, or EMA, is a moving average that gives more weight to recent prices than to old ones, so it follows price faster than a simple moving average of the same length. Each new value is the latest close times a smoothing factor plus the previous EMA times one minus that factor.
Across five markets and six holding periods, which is 30 cases of the 9 and 21 period EMA crossover on hourly bars from October 2016 to October 2026, with between 308 and 2,641 non overlapping cases each, 9 averaged above zero after costs, 0 were beyond what chance alone produces in the winning direction, and 0 in the losing direction. The EMA crossover showed no reliable edge on these five markets (signal matrix v1). Past results, not a forecast.
Last updated 26 Nov 2026. Reviewed by the Custom Trading Platform education desk. Worked figures are sample arithmetic, shown in full. Test figures are results from our own tests on past data, with their cases, period and cost.
Ten closes: 10, 11, 12, 11, 13, 14, 13, 15, 16 and 15, period 5, so alpha is 0.3333. The first EMA is the average of the first five closes: (10 + 11 + 12 + 11 + 13) divided by 5, which is 11.4.
| Close number | Close | EMA 5 | Working | SMA 5 |
|---|---|---|---|---|
| 5 | 13 | 11.4 | (10 + 11 + 12 + 11 + 13) / 5 | 11.4 |
| 6 | 14 | 12.27 | 14 x 0.3333 + 11.4 x 0.6667 | 12.2 |
| 7 | 13 | 12.51 | 13 x 0.3333 + 12.2667 x 0.6667 | 12.6 |
| 8 | 15 | 13.34 | 15 x 0.3333 + 12.5111 x 0.6667 | 13.2 |
| 9 | 16 | 14.23 | 16 x 0.3333 + 13.3407 x 0.6667 | 14.2 |
| 10 | 15 | 14.48 | 15 x 0.3333 + 14.2272 x 0.6667 | 14.6 |
The weights on the latest five closes in the EMA are 0.3333, 0.2222, 0.1481, 0.0988 and 0.0658, which add to 0.8683. The remaining 0.1317 sits on all older closes, so the EMA still remembers them. The simple average gives each of its five closes a weight of 0.2 and forgets everything older. At the sixth close the EMA moves up by 0.87 and the SMA by 0.8, because the new close of 14 is above the average and carries more weight in the EMA.
| EMA | SMA | |
|---|---|---|
| Weights | Falling with age, never reaching zero | Equal inside the window, zero outside |
| Reaction | Faster | Slower |
| Whipsaws in a range | More | Fewer |
| Needs a starting value | Yes, usually the first SMA | No |
| Common lengths | 9, 12, 21, 26, 50, 200 | 20, 50, 100, 200 |
Engine: signal matrix v1 (what happened after the textbook rule, over all history). The rule buys at the next open when the 9 period EMA crosses above the 21 period EMA and sells when it crosses below, on closed hourly bars, and measures the move 4, 12, 24, 50, 72 and 168 bars later. Events are counted only when they do not overlap. The unseen data check is the last 730 days against the earlier years, and the luck check is the beyond chance column. These are results from past data on the markets and dates shown. They describe what happened. They do not predict what will happen and are not advice or a signal.
| Market | Horizon (bars) | Cases (n) | Average move before costs | Cost | Average move after costs | Share ending ahead after costs | Earlier years, after costs | Last 730 days, after costs | Beyond chance? |
|---|---|---|---|---|---|---|---|---|---|
| AUDUSD hourly | 4 | 2,364 | 0.3 | 1.17 | minus 0.87 | 46.9 | minus 0.87 | minus 0.91 | no (t 0.79) |
| AUDUSD hourly | 12 | 1,807 | minus 0.03 | 1.17 | minus 1.2 | 46.9 | minus 1.14 | minus 1.42 | no (t minus 0.04) |
| AUDUSD hourly | 24 | 1,334 | minus 0.18 | 1.17 | minus 1.35 | 48.5 | minus 0.93 | minus 2.96 | no (t minus 0.16) |
| AUDUSD hourly | 50 | 863 | 1.59 | 1.17 | 0.42 | 50.3 | 0.16 | 1.88 | no (t 0.78) |
| AUDUSD hourly | 72 | 656 | minus 4.73 | 1.17 | minus 5.9 | 48 | minus 6.16 | minus 4.87 | no (t minus 1.66) |
| AUDUSD hourly | 168 | 331 | 4.75 | 1.17 | 3.58 | 50.5 | minus 2.23 | 15.56 | no (t 0.77) |
| EURUSD hourly | 4 | 2,318 | minus 0.26 | 1.119 | minus 1.38 | 45.4 | minus 1.54 | minus 0.74 | no (t minus 0.55) |
| EURUSD hourly | 12 | 1,764 | minus 0.88 | 1.119 | minus 2 | 47.3 | minus 2.14 | minus 1.47 | no (t minus 1.04) |
| EURUSD hourly | 24 | 1,320 | minus 1.59 | 1.119 | minus 2.71 | 46.9 | minus 2.35 | minus 4.1 | no (t minus 1.16) |
| EURUSD hourly | 50 | 851 | 1.23 | 1.119 | 0.11 | 50.1 | 0.19 | minus 0.19 | no (t 0.49) |
| EURUSD hourly | 72 | 653 | minus 0.44 | 1.119 | minus 1.56 | 50.5 | minus 1.21 | minus 2.94 | no (t minus 0.13) |
| EURUSD hourly | 168 | 325 | 2.14 | 1.119 | 1.02 | 51.7 | 1.87 | 13.53 | no (t 0.31) |
| GBPUSD hourly | 4 | 2,285 | minus 0.63 | 1.241 | minus 1.88 | 45.7 | minus 2.05 | minus 1.2 | no (t minus 1.03) |
| GBPUSD hourly | 12 | 1,764 | 1.85 | 1.241 | 0.61 | 49.3 | 0.43 | 1.34 | no (t 1.65) |
| GBPUSD hourly | 24 | 1,318 | minus 1 | 1.241 | minus 2.24 | 48.4 | minus 2.88 | 0.39 | no (t minus 0.56) |
| GBPUSD hourly | 50 | 852 | 1.14 | 1.241 | minus 0.1 | 49.4 | minus 1.53 | 5.41 | no (t 0.34) |
| GBPUSD hourly | 72 | 653 | minus 4.88 | 1.241 | minus 6.12 | 47 | minus 6.19 | minus 4.45 | no (t minus 1.09) |
| GBPUSD hourly | 168 | 329 | 6.18 | 1.241 | 4.94 | 48 | 6.08 | minus 0.19 | no (t 0.61) |
| XAUUSD hourly | 4 | 2,232 | 2.23 | 1.773 | 0.46 | 47.4 | minus 0.62 | 4.77 | no (t 0.86) |
| XAUUSD hourly | 12 | 1,691 | 6.2 | 1.773 | 4.43 | 47.4 | 2.41 | 12.65 | no (t 1.28) |
| XAUUSD hourly | 24 | 1,250 | 7.35 | 1.773 | 5.57 | 49.5 | 1.53 | 21.6 | no (t 0.81) |
| XAUUSD hourly | 50 | 807 | minus 3.63 | 1.773 | minus 5.4 | 49.1 | minus 8.8 | 8.45 | no (t minus 0.2) |
| XAUUSD hourly | 72 | 626 | minus 7.98 | 1.773 | minus 9.75 | 49.5 | minus 11.81 | 0.04 | no (t minus 0.39) |
| XAUUSD hourly | 168 | 308 | 1.44 | 1.773 | minus 0.33 | 48.1 | minus 8.9 | minus 32.17 | no (t 0.04) |
| BTCUSD hourly | 4 | 2,641 | minus 0.02 | 1 | minus 1.02 | 40.2 | minus 1.17 | minus 0.58 | no (t minus 0.08) |
| BTCUSD hourly | 12 | 1,992 | minus 0.74 | 1 | minus 1.74 | 43.2 | minus 1.82 | minus 1.51 | no (t minus 1.31) |
| BTCUSD hourly | 24 | 1,503 | minus 0.81 | 1 | minus 1.81 | 48 | minus 2.45 | 0.13 | no (t minus 0.84) |
| BTCUSD hourly | 50 | 954 | 0.48 | 1 | minus 0.52 | 49.2 | minus 1.83 | 2.92 | no (t 0.27) |
| BTCUSD hourly | 72 | 736 | 0.05 | 1 | minus 0.95 | 49.3 | minus 2.07 | 2.02 | no (t 0.02) |
| BTCUSD hourly | 168 | 367 | minus 5.21 | 1 | minus 6.21 | 49.6 | minus 10.98 | 1.86 | no (t minus 1) |
How to read the table. A pip is 0.0001 for AUDUSD, EURUSD and GBPUSD, 0.1 dollar for XAUUSD and 0.1 of one percent of the price for BTCUSD, so move sizes are not comparable across markets, only the sign and the share ending ahead are. Cost per round trip, in the same pips: AUDUSD 1.17, EURUSD 1.119, GBPUSD 1.241 (measured average spread plus 0.4 slippage plus 0.7 commission), XAUUSD 1.773 and BTCUSD 1.0 (assumptions, and a tick level spread read would refine them). Swap is not included. Data runs from October 2016 for the currency pairs and gold, and from August 2017 for BTCUSD, to October 2026. A row is beyond chance when its t statistic is larger than the 95th percentile of the best result found by shuffling event dates (AUDUSD 3.74, EURUSD 3.98, GBPUSD 3.75, XAUUSD 4.09, BTCUSD 3.85), because each market tested 528 signal and horizon cells and some look good by chance. These tests were run with a flat cost per market and have not been checked independently by a second person.
An EMA lags price, because it is built from past closes, and a crossover is only seen after the move has begun. In a sideways market the 9 and 21 EMAs cross again and again, and each crossing carries the cost of a trade. A longer or shorter pair of lengths gives different crossings, and we tested only 9 and 21.
Worked figures are sample arithmetic, shown in full, as of 26 Nov 2026, and each EMA row was recomputed by a second method before it was kept. The test figures come from the signal matrix v1 run of 26 Nov 2026 in a copy of our engine, with a manifest, on hourly bars to October 2026. How we check numbers is on the methodology page, the people behind the site are on the about page, and corrections go through contact.
We will recompute every EMA row in a second spreadsheet, repeat with a period of 9 and 21 on a second set of sample closes, recalculate the crossover table from the manifest, and repeat after the next data update. Last tested: not yet, results pending.
What is the exponential moving average? An average of recent closes in which each older close counts a little less than the one after it.
How do you calculate the EMA? Multiply the latest close by alpha, which is 2 divided by (period plus 1), and add the previous EMA times (1 minus alpha), starting from a simple average.
What is the difference between EMA and SMA? The EMA weights recent prices more and reacts faster. The SMA weights every close in the window equally.
What is the best EMA setting? There is no best setting. Common lengths are 9, 12, 21, 26, 50 and 200, and the 9 and 21 crossover showed no reliable edge in our tests.
What does the 200 EMA show? The slow trend over about 200 periods. See the 200 day moving average test.
Is the EMA crossover a good strategy? In our tests on five markets the 9 and 21 crossover did not show a reliable edge, and each crossing costs the spread.
Does the EMA predict price? No. It summarises past closes.
Glossary, moving average crossover test, golden cross test, 200 day moving average test, MACD indicator test, RSI guide, volatility calculator, position size calculator, disclaimer.
Start free: create a free account to get the weekly note on tools and tests.
Education only. Nothing here is financial advice or a signal.
More: all indicator guides, glossary.
© 2026 Custom Trading Platform
Nothing here is financial advice, a signal or an offer. Trading can lose money, and on some products more than you put in. Past results describe the past.