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.

SMA = (C1 + C2 + … + CN) ÷ N

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:

k = 2 ÷ (N + 1)
EMAtoday = (Closetoday − EMAyesterday) × k + EMAyesterday

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.

A 20 SMA (blue) and 20 EMA (orange) on the same chart. When the trend turns, the EMA bends first.

Common Periods

PeriodSpeedTypical use
9Very fastShort-term momentum; scalping and day trading entries
20 / 21FastShort-term trend; pullback entries in strong trends
50MediumMedium-term trend; widely watched on 4-hour and daily charts
100SlowMedium/long-term trend filter
200Very slowThe 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 a steady uptrend, pullbacks tend to stall near the rising 9 and 21 EMAs, and price stays mostly above them.

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.

After a long decline, price turns up. The 20 SMA (blue) crosses above the 50 SMA (orange) well after the low — a clear example of lag.

Example: A simple crossover rule

  1. Trade only in the direction of the 200 SMA (price above it → buys only).
  2. Buy when the 9 EMA crosses above the 21 EMA.
  3. Stop loss below the most recent swing low.
  4. 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.

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. 1.2700
  2. 1.2710
  3. 1.2705
  4. 1.2715
Sum = 5.0820. 5.0820 ÷ 4 = 1.2705.

What is the smoothing factor k for a 9-period EMA?

  1. 0.20
  2. 0.11
  3. 0.18
k = 2 ÷ (9 + 1) = 0.20.

What is a golden cross?

  1. Price crossing above the 50 MA
  2. The 50 MA crossing above the 200 MA
  3. The 200 MA crossing above the 50 MA
A golden cross is the 50 crossing above the 200 — a long-term bullish signal.

Why does an EMA react faster than an SMA of the same period?

  1. It uses high and low prices
  2. It uses fewer candles
  3. It ignores old prices completely
  4. It gives more weight to recent prices
The EMA weights recent prices more heavily.

In which market do moving average crossovers produce the most false signals?

  1. A strong uptrend
  2. A sideways range
  3. A strong downtrend
In a range, the MAs flatten and cross back and forth — whipsaws.