Chartshala
Level 2: Patterns and indicators · Lesson 10 of 23

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.

4 min read3-question quizUpdated 30 November 2026Charts use simulated prices

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.

A 20-period EMA and a 50-period SMA through a downtrend and a recoveryDuring the decline price stays below both averages; as it recovers, the faster EMA crosses above the slower SMA and then acts as support on pullbacks.20 EMA50 SMA1,0501,1001,1501,200Crossover
A 20-period EMA (blue) and a 50-period SMA (amber). In the decline, price stays below both; in the recovery, the faster average crosses above the slower one and then supports the pullbacks.

Which periods?

AverageCommon use
9 to 21 periodsShort-term momentum and pullback entries
50-dayThe medium-term trend, widely watched by institutions
200-dayThe 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

  1. 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.
  2. Dynamic support and resistance. In steady trends, pullbacks often stall near the 20 or 50-period average.
  3. 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.
  4. 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?

2. What is a golden cross?

3. In which market do moving-average crossovers perform worst?

Finish the quiz or mark this lesson complete to track your progress.