Moving averages explained: SMA vs EMA and the golden cross
A moving average smooths price by averaging the last N closes, updating with each new bar. The simple (SMA) and exponential (EMA) types are the most used.
What a moving average is
A moving average is the average price over a fixed number of recent periods, recalculated every time a new candle closes — the window 'moves' forward. Plotted on a chart, it turns a jagged price series into a smooth line and makes the underlying direction easier to see.
Shorter averages (9 to 21 periods) hug the price and react quickly; longer ones (50, 100, 200) move slowly and describe the bigger trend. On a daily chart the closely watched 200-day average covers roughly the last ten months of trading.
How SMA and EMA are calculated
A simple moving average (SMA) gives every price in the window the same weight. An exponential moving average (EMA) applies a weight that decays over time, so recent prices count more:
SMA = (P1 + P2 + … + PN) ÷ N EMA today = price × k + EMA yesterday × (1 − k) k = 2 ÷ (N + 1)
For a 9-period EMA, k = 2 ÷ 10 = 0.2, so today's close carries 20% of the weight. Our charts let you overlay the 20- and 50-period SMA and the 9- and 21-period EMA.
How to use it — a worked example
Take five closing prices: 10, 11, 12, 13 and 14. The 5-period SMA is (10 + 11 + 12 + 13 + 14) ÷ 5 = 12. Price (14) is above its average and the average itself is rising — the textbook picture of an uptrend. If price then dropped to 11.5 and closed below a still-rising average, that would be a first warning, not yet proof, that the trend is weakening.
Common uses: trend direction (is price above or below the average, and is the average sloping up or down?); dynamic support and resistance, because pullbacks within a trend often pause near a widely followed average; and crossovers. When the 50-day SMA crosses above the 200-day, traders call it a golden cross; the opposite is a death cross.
Limitations and common mistakes
Every moving average lags, because it is built from past prices. Golden and death crosses in particular tend to arrive well after a turn has begun, and in sideways markets price criss-crosses its average constantly, producing a series of false signals.
There is no 'correct' length: the 200-day works partly because so many people watch it. Testing dozens of lengths until one fits the past is curve-fitting and rarely works going forward. An EMA reacts faster but gets faked out more often; an SMA is steadier but slower. Pick one that matches your time horizon and use it consistently.
Frequently asked questions
What is the difference between SMA and EMA?
An SMA weights every price in the window equally; an EMA gives more weight to recent prices, so it turns sooner when the trend changes — at the cost of more false signals.
What is a golden cross?
A golden cross occurs when a shorter moving average, usually the 50-day, crosses above a longer one, usually the 200-day. It is read as a sign of a strengthening uptrend; the opposite is called a death cross. Both are lagging signals.
Which moving average is best?
None is best in general. Short-term traders tend to use 9- to 21-period averages, swing traders the 50, and long-term investors the 200-day. Using one consistently, alongside other evidence, matters more than the exact length.