What a moving average is, and the 20/50/200
Lesson 19 · about 7 min
A moving average is the most common line on any chart and the least understood by the people using it. It is not a signal generator. It is arithmetic: the average closing price over the last N candles, recalculated every candle. Once you see it as arithmetic, you can use it for what it is good at and stop expecting things it cannot do.
The calculation
Take the last N closes, add them, divide by N. Plot the result on the current candle. Next candle, drop the oldest close, add the newest, repeat. That is a simple moving average, abbreviated SMA.
Five-period SMA on daily closes:
| Day | Close | Last 5 closes | 5-SMA |
|---|---|---|---|
| 1 | 20.0 | ||
| 2 | 20.4 | ||
| 3 | 20.2 | ||
| 4 | 20.8 | ||
| 5 | 21.0 | 20.0, 20.4, 20.2, 20.8, 21.0 | 20.48 |
| 6 | 21.4 | 20.4, 20.2, 20.8, 21.0, 21.4 | 20.76 |
| 7 | 21.1 | 20.2, 20.8, 21.0, 21.4, 21.1 | 21.10 |
| 8 | 20.6 | 20.8, 21.0, 21.4, 21.1, 20.6 | 20.98 |
Two things to notice. The average moves more slowly than price: on day 8 price dropped 0.5 but the average dropped only 0.12. And the average is always behind: on day 7, price was at 21.1 and the average had only reached 21.1 because prices from four days earlier were still in it. This is the lag that Lesson 4 of this module is about.
Exponential moving average
An exponential moving average (EMA) does the same job but gives more weight to recent closes and less to old ones. The effect is that it turns faster when price changes direction. Traders who want a responsive line use EMAs; traders who want a smoother line use SMAs. The difference is small in practice. Pick one and use it consistently. This course uses "MA" for either.
What the line tells you
An MA is the average price paid by everyone who traded in the last N periods, roughly. That gives it a plain-English meaning:
- Price above the 20-day MA: the average buyer of the last month is in profit.
- Price below the 200-day MA: the average buyer of the last year is losing.
A rising MA means recent closes are higher than the ones dropping off the back. A falling MA means the reverse. A flat MA means price has been going sideways over that window.
That is the honest content of an MA: where the crowd's average is, and which way it is drifting.
Key idea: A moving average is the average close over the last N candles. It shows where the average participant over that window is positioned and which way the window is drifting. It smooths, it lags, and it does not predict.
The 20, 50 and 200
Three lengths are used far more than any others, on daily charts:
| Length | Roughly covers | Who watches it |
|---|---|---|
| 20 | One month of sessions | Short-term traders; pullback buyers in strong trends |
| 50 | One quarter | Swing traders; fund managers assessing intermediate trend |
| 200 | About one year | Nearly everyone; the most-cited line in financial media |
There is nothing magical about these numbers. They are popular because they are popular. Enough traders and enough algorithms watch the 50 and 200 that price sometimes reacts near them simply because orders are waiting there. That is the same self-fulfilling effect as round numbers and obvious trendlines.
On intraday charts, traders use the same numbers on their own timeframe (a 20-period MA on a five-minute chart covers 100 minutes) or use the 9 and 21 EMA. Again, popularity is the reason.
Reading the three together
The relationship between price and the three MAs gives a quick read of trend health:
Healthy uptrend: price > 20 > 50 > 200, all rising
price /
/
/ ...... 20
/ ....
/ .... _____ 50
/.... ____
/... ____ - - - 200
/.. ___ - - -
/. __ - -
/_ _ - -
Weakening: price falls below 20, 20 flattens, 50 still rising
/\
/ \ ...... 20 (flattening)
/ \.
/ .... \ ____ 50 (still rising)
/... ____\ /
/.. ___ \ /
/. __ \/
/_ _
When the shorter MAs are above the longer ones and all point up, the crowd at every window is in profit and the trend is healthy. When they tangle together and go flat, the market is ranging and MAs are useless. When they are stacked in reverse and falling, the trend is down.
That is all the MAs can tell you about trend. It is the same information you get from higher highs and higher lows, just smoothed into a line. If the two disagree, trust the swing points; they are the raw data.
Try it: Put the 20, 50 and 200 SMA on a daily chart. Scroll back a year. Find one stretch where they were cleanly stacked and one where they were tangled. Note how price behaved in each. Then remove the MAs and identify the same two stretches using swing highs and lows alone. You should be able to.
Recap
- A moving average is the average close over the last N candles, recalculated each candle. EMAs weight recent closes more heavily.
- It represents roughly where the average participant over that window is positioned.
- The 20, 50 and 200 are popular because they are popular, which is enough to make them mildly self-fulfilling.
- Stacked and rising MAs mean a healthy uptrend; tangled and flat MAs mean a range where they are useless.
- MAs summarize what swing points already show. When they disagree, trust the swing points.