Technical analysis · Lesson 3 of 4
Moving averages
4 min read
Draft lesson — under editorial review
A moving average smooths out the noise in price so you can see the underlying direction more clearly. It is one of the oldest and most widely used tools in technical analysis. Used well, it is a helpful filter; used as a stand-alone signal, it can be costly in sideways markets.
Simple moving average (SMA)
A simple moving average is the average closing price over a set number of periods. A 20-period SMA on a daily chart is the average of the last 20 daily closes. Each new candle adds the newest close and drops the oldest, so the average "moves" along the chart.
Worked example: a 5-period SMA
The last five closes on EUR/USD are (example prices):
1.1000, 1.1010, 1.1030, 1.1020, 1.1040
- Sum: 1.1000 + 1.1010 + 1.1030 + 1.1020 + 1.1040 = 5.5100
- SMA: 5.5100 ÷ 5 = 1.1020
The next candle closes at 1.1090. Drop the oldest close (1.1000) and add the new one:
- New sum: 5.5100 − 1.1000 + 1.1090 = 5.5190
- New SMA: 5.5190 ÷ 5 = 1.1038
Price jumped 50 pips above the previous close, but the SMA rose by only 18 pips. That gap is the smoothing at work, and it is also the lag you will meet below.
Exponential moving average (EMA)
An exponential moving average gives more weight to recent prices, so it reacts faster. It uses a smoothing factor:
- Multiplier = 2 ÷ (number of periods + 1)
- New EMA = (close − previous EMA) × multiplier + previous EMA
For a 5-period EMA, the multiplier is 2 ÷ 6 = about 0.3333.
Worked example: a 5-period EMA
Start the EMA at the SMA value of 1.1020 (a common starting point). The next close is 1.1090.
- Difference: 1.1090 − 1.1020 = 0.0070
- Weighted: 0.0070 × 0.3333 = about 0.0023
- New EMA: 1.1020 + 0.0023 = 1.1043
Compare the two after the same candle:
| Average | Value after the 1.1090 close | Rise |
|---|---|---|
| 5-period SMA | 1.1038 | 18 pips |
| 5-period EMA | 1.1043 | 23 pips |
The EMA responded more to the latest move. Neither is "better": the SMA is steadier and less prone to false signals, while the EMA turns sooner and is more easily shaken by noise.
Common settings
There is nothing magical about any period, but some are widely watched:
- 20-period: short-term trend on most timeframes.
- 50-period: medium-term trend.
- 200-period: long-term trend, especially on daily charts.
Because many traders watch these, price sometimes reacts around them simply because so many eyes are on them.
Three ways traders use moving averages
1. Trend filter
If price is above a rising 200-period average, the long-term trend is broadly up; below a falling one, broadly down. Many traders only look for trades in the direction the filter allows. A flat average with price weaving across it suggests a range.
2. Dynamic support and resistance
In a steady trend, pullbacks often pause near a shorter average such as the 20- or 50-period. Unlike a horizontal level, the average moves with price, which is why it is called dynamic support or resistance. Treat it as an area, not an exact line.
3. Crossovers
A crossover is when a faster average crosses a slower one.
- When the 50-period crosses above the 200-period, it is often called a golden cross and read as bullish.
- When the 50-period crosses below the 200-period, it is often called a death cross and read as bearish.
The dramatic names overstate their power. By the time a slow crossover happens, much of the move is often already over.
The big limitation: lag
Every moving average is built from past prices, so it always lags. The longer the period, the greater the lag. This creates two recurring problems:
- Late signals: in a fast reversal, a long average may not turn until price has already moved a long way.
- Whipsaws: in a sideways market, price crosses back and forth over the average, and crossover signals flip repeatedly, each one producing a small loss plus spread costs.
You cannot remove lag without adding noise. A shorter period lags less but whipsaws more. This trade-off is why moving averages work best combined with trend structure and key levels rather than on their own.
Key takeaways
- An SMA is a plain average of recent closes; an EMA weights recent prices more and reacts faster.
- EMA multiplier = 2 ÷ (periods + 1); for a 5-period EMA that is about 0.3333.
- Use averages as trend filters, dynamic support or resistance, or for crossovers, not as stand-alone signals.
- All moving averages lag; in ranging markets crossovers whipsaw and costs add up.
Educational content only — not financial advice. Trading leveraged products such as forex and CFDs carries a high risk of losing money.