Home / Course / Module 5 / Moving Averages and Trend
Module 5 · Lesson 5 of 8A moving average smooths price into a single flowing line so the trend is easier to see. This lesson shows exactly how it is calculated, how the common versions differ, and what it cannot do.
Risk warning: CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money. Educational content only. Nothing here is a recommendation, and no result is guaranteed.
A moving average (MA) is the average of the last N closing prices, recalculated as each new candle closes. As new prices arrive, the oldest drops out, so the average "moves". Plotting it on the chart gives a smooth line that strips out much of the day-to-day noise.
Think of a runner's average pace over the last 5 kilometres. A single slow kilometre barely changes it, but a sustained slowdown pulls it down. In the same way, one odd candle barely moves a 50-period MA, while a lasting change in direction eventually does.
The number N is the period. A short period such as 10 reacts quickly but gives more false signals. A long period such as 200 is smooth and slow. Common choices include 10, 20, 50 and 200, though there is nothing magic about any of them.
Hypothetical example with a 5-period simple moving average (SMA). Five closing prices for gold: $1,990, $2,000, $2,010, $2,020, $2,030.
The next candle closes at $2,040. Drop the oldest ($1,990) and add the new one: 2,000 + 2,010 + 2,020 + 2,030 + 2,040 = 10,100, and 10,100 divided by 5 = $2,020. The average rose by $10 while price rose by $10 per candle. The same method with 20 closes gives a 20-period MA.
The simple moving average (SMA) gives every price in the window equal weight. The exponential moving average (EMA) gives more weight to recent prices, so it reacts faster. The weighting multiplier is 2 divided by (N + 1). For a 5-period EMA that is 2 / 6 = 0.333.
Continue the hypothetical numbers. Previous 5-period EMA = $2,010. New close = $2,050.
The SMA of the latest five closes (2,000, 2,010, 2,020, 2,030, 2,050) is 10,110 / 5 = $2,022. The EMA ($2,023.3) is slightly higher because it responded more strongly to the latest jump.
| SMA | EMA | |
|---|---|---|
| Weighting | Equal | Recent prices count more |
| Speed | Slower, smoother | Faster, more reactive |
| Trade-off | More lag | More false signals |
Neither is "correct". Pick one, stay consistent, and know its behaviour.
Three simple readings are common:
The key word is consistent with. A moving average does not cause anything. It summarises what has already happened.
| What you see | A cautious reading |
|---|---|
| Price above a rising 50 MA | Trend is up for now |
| Price below a falling 50 MA | Trend is down for now |
| MA flat, price criss-crossing it | No clear trend, signals unreliable |
| Price far above its MA | Stretched, so a pullback is possible, but trends can stay stretched |
When a faster MA crosses a slower one, traders treat it as a possible change in trend. For example, a 50-period MA crossing above a 200-period MA is often called a golden cross, and crossing below is called a death cross. The names sound dramatic, but they are simply signs that recent prices have been higher or lower than older prices.
Hypothetical: the 20-period EMA is at $2,008 and the 50-period EMA is at $2,010, so the faster line is below. After a rally, the 20 EMA reaches $2,014 while the 50 EMA is $2,011. The faster line has crossed above, which some traders read as momentum turning up. But by the time the lines cross, price may already have moved a long way. That delay is called lag, and it is built in: every MA is calculated from past prices.
The smoother the line, the later the signal. Crossovers tend to arrive after a move has begun and often fail in sideways markets, producing a string of small losses called whipsaws.
Moving averages shine in trending markets and struggle in ranges. In a sideways market price keeps crossing the line, and every crossover signal is a false alarm. A basic filter is to ask first: is the MA clearly sloping? If it is flat, treat signals with scepticism.
Common mistakes
Moving averages are a descriptive tool for judging trend, not a forecasting tool. Use them to avoid fighting an obvious trend and to frame risk, and remember leveraged trading can lose money quickly.
There is no best setting. Common choices are 10, 20, 50 and 200, and each trades responsiveness for smoothness. Pick one that suits your timeframe and keep it consistent.
No. It describes the existing trend and lags behind price. Any trading decision still needs a plan for risk, including where you would exit if wrong.
The Gold Desk shares XAUUSD signals on Telegram, with entry, stop loss and targets on every call. Signals are educational ideas, not advice, and no result is guaranteed. Not directed at residents of the USA. Join the free Telegram channel.