Forex Moving Averages
A moving average (MA) is the average closing price over a set number of candles, recalculated every new candle. It smooths out the noise so you can see the trend. It is the most widely used indicator in trading.
Simple Moving Average (SMA)
The simple moving average adds up the last N closing prices and divides by N. Every candle has equal weight.
Example: 5-period SMA
The last five EUR/USD closes are 1.0850, 1.0862, 1.0858, 1.0871, 1.0879.
Sum = 1.0850 + 1.0862 + 1.0858 + 1.0871 + 1.0879 = 5.4320 SMA5 = 5.4320 ÷ 5 = 1.0864
When the next candle closes, the oldest close (1.0850) drops out and the new one is added. That is why it "moves".
Exponential Moving Average (EMA)
The exponential moving average gives more weight to recent prices, so it reacts faster. It uses a smoothing factor k:
The very first EMA value is usually seeded with the SMA of the first N closes.
Example: SMA vs EMA reacting to a jump
EUR/USD has closed at 1.0850 for five candles, so both the 5-SMA and the 5-EMA are 1.0850. The next candle closes at 1.0880 (+30 pips).
SMA5 = (1.0850 × 4 + 1.0880) ÷ 5 = 5.4280 ÷ 5 = 1.0856 (moved 6 pips)
k = 2 ÷ (5 + 1) = 0.3333
EMA5 = (1.0880 − 1.0850) × 0.3333 + 1.0850
= 0.0030 × 0.3333 + 1.0850 = 0.0010 + 1.0850 = 1.0860 (moved 10 pips)
The EMA moved 10 pips; the SMA only 6. The EMA reacts faster to new prices.
SMA
Smoother and slower. Fewer false signals, but later entries and exits. Popular for long-term levels like the 200 SMA.
EMA
Faster and more responsive. Earlier signals, but more whipsaws in choppy markets. Popular with short-term traders.
Common Periods
| Period | Speed | Typical use |
|---|---|---|
| 9 | Very fast | Short-term momentum; scalping and day trading entries |
| 20 / 21 | Fast | Short-term trend; pullback entries in strong trends |
| 50 | Medium | Medium-term trend; widely watched on 4-hour and daily charts |
| 100 | Slow | Medium/long-term trend filter |
| 200 | Very slow | The long-term trend. Above it = bullish bias; below it = bearish bias |
Tip: Popular settings work better precisely because they are popular. Lots of traders watching the daily 200 SMA is what makes it react. Exotic settings like a 37-period MA have no crowd behind them.
Moving Averages as Dynamic Support and Resistance
Horizontal support and resistance stays at one price. A moving average moves with the trend, so it acts as dynamic support (in uptrends) or resistance (in downtrends).
- In an uptrend, look for buy setups when price pulls back to a rising MA.
- In a downtrend, look for sell setups when price rallies back to a falling MA.
- Use a candlestick signal at the MA as your trigger, not the touch alone.
- A flat MA with price crossing back and forth means there is no trend — MAs work poorly there.
Crossovers: Golden Cross and Death Cross
A crossover happens when a faster MA crosses a slower one.
Golden cross
The 50 crosses above the 200. A sign that a long-term uptrend may be starting.
Death cross
The 50 crosses below the 200. A sign that a long-term downtrend may be starting.
The same idea works with shorter pairs such as 9/21 or 20/50 for faster signals. The chart below uses a 20/50 SMA cross so you can see it on a short sample.
Example: A simple crossover rule
- Trade only in the direction of the 200 SMA (price above it → buys only).
- Buy when the 9 EMA crosses above the 21 EMA.
- Stop loss below the most recent swing low.
- Exit when the 9 EMA crosses back below the 21 EMA.
This is a starting point for backtesting, not a ready-made money machine.
The Problem of Lag
A moving average is built from past prices, so it always lags behind the market. The longer the period, the bigger the lag.
- A crossover often comes after a large part of the move has already happened.
- In sideways markets, MAs cross back and forth, producing many losing signals (whipsaws).
- Shorter periods reduce lag but increase false signals. There is no perfect setting.
Warning: MA crossover systems tend to have a low win rate. They rely on a few large trend trades to pay for many small losses. If you cannot sit through a string of losers, this style may not suit you. Always size positions so a losing streak does not hurt your account — see Risk Management.
Test Yourself With Exercises
The last four closes are 1.2700, 1.2710, 1.2690 and 1.2720. What is the 4-period SMA?
- 1.2700
- 1.2710
- 1.2705
- 1.2715
What is the smoothing factor k for a 9-period EMA?
- 0.20
- 0.11
- 0.18
What is a golden cross?
- Price crossing above the 50 MA
- The 50 MA crossing above the 200 MA
- The 200 MA crossing above the 50 MA
Why does an EMA react faster than an SMA of the same period?
- It uses high and low prices
- It uses fewer candles
- It ignores old prices completely
- It gives more weight to recent prices
In which market do moving average crossovers produce the most false signals?
- A strong uptrend
- A sideways range
- A strong downtrend