Moving averages: SMA and EMA
A moving average smooths price to show the underlying direction. It is the simplest trend tool there is, and still one of the most useful.
A moving average is the average closing price over the last n periods, recalculated every period, so it moves along with the chart. It filters out day-to-day noise and shows the direction and strength of the trend at a glance.
Simple and exponential
The simple moving average (SMA) gives every period equal weight: a 20-day SMA is the sum of the last 20 closes divided by 20. The exponential moving average (EMA) gives more weight to recent prices, so it reacts faster.
EMA today = Close × k + EMA yesterday × (1 − k), where k = 2 ÷ (n + 1)
For a 20-period EMA, k = 2 ÷ 21, about 0.095, so today’s close carries roughly 9.5% of the weight. The EMA turns sooner than the SMA, at the cost of more false turns.
Which periods?
| Average | Common use |
|---|---|
| 9 to 21 periods | Short-term momentum and pullback entries |
| 50-day | The medium-term trend, widely watched by institutions |
| 200-day | The long-term trend. Price above a rising 200-day average is widely treated as a bull market for that stock |
There is nothing magical about these numbers. They matter partly because so many traders watch them, which makes reactions around them more likely.
Four ways to use them
- Trend filter. Look for long trades only when price is above a rising average, and short trades only when it is below a falling one.
- Dynamic support and resistance. In steady trends, pullbacks often stall near the 20 or 50-period average.
- Crossovers. When a faster average crosses above a slower one, momentum has turned up. The best known is the golden cross, the 50-day crossing above the 200-day; the opposite is the death cross.
- Slope. A steep, rising average shows strong momentum; a flat one shows a range.
The weakness: lag
Every moving average is built from past prices, so it confirms a turn only after it has happened. In trends that is acceptable. In sideways markets, price weaves back and forth across the average and crossovers produce a string of small losses, known as whipsaws. A flat, tangled pair of averages is a signal to stand aside or switch to range tactics.
One or two is enough. Three or four averages on one chart add clutter, not information. Choose a fast and a slow one that suit your timeframe, and stick with them.
Key takeaways
- An SMA weights every period equally; an EMA weights recent prices more and turns sooner.
- The 20, 50 and 200-period averages are widely watched, which is part of why they work.
- Use averages as a trend filter, as dynamic support and resistance, and through crossovers and slope.
- A golden cross is the 50-day crossing above the 200-day; a death cross is the reverse.
- All moving averages lag and whipsaw in ranges.
Check your understanding
Choose an answer to see the explanation. Your score is saved in this browser.
1. Why does an EMA react faster than an SMA of the same length?
The EMA’s weighting factor k gives the newest close a larger share, so it turns sooner.
2. What is a golden cross?
It signals that medium-term momentum has moved above the long-term trend.
3. In which market do moving-average crossovers perform worst?
In ranges, price keeps crossing the averages, producing repeated false signals.
Finish the quiz or mark this lesson complete to track your progress.