CommunitySign in

Share

Stocks and funds

Definition

A moving average is the average price of an asset over a set number of recent periods, recalculated each period so that it moves along with the chart and smooths out short-term swings.

How it works

A simple moving average (SMA) adds the last N closing prices and divides by N: SMA = sum of the last N closes ÷ N. Each new period, the oldest price drops out and the newest is added. An exponential moving average (EMA) gives more weight to recent prices. It uses a multiplier of 2 ÷ (N + 1): EMA today = previous EMA + (today's close − previous EMA) × multiplier. As a result, an EMA reacts faster to new prices than an SMA of the same length.

Common lengths are the 20-day, 50-day and 200-day averages. Traders use them to judge the direction of a trend and as reference levels on a chart. When a shorter average crosses above a longer one, such as the 50-day above the 200-day, it is called a golden cross; a cross below is called a death cross.

A moving average is a lagging indicator: it is built from past prices, so it confirms a move only after the move has started. In sideways markets, prices and averages cross back and forth, producing many false signals. Charts may also use different price inputs or settings, so values can differ slightly between sources.

Example (hypothetical numbers)

Suppose Stock X closed at $20, $21, $22, $21 and $26 over 5 days.

5-day SMA = ($20 + $21 + $22 + $21 + $26) ÷ 5 = $110 ÷ 5 = $22.00.

The next close is $27 and the $20 drops out: ($21 + $22 + $21 + $26 + $27) ÷ 5 = $117 ÷ 5 = $23.40.

A 5-day EMA starting from $22.00 uses a multiplier of 2 ÷ (5 + 1) ≈ 0.333: $22.00 + ($27 − $22.00) × 0.333 ≈ $23.67.

The EMA reacts more to the new price than the SMA, but both stay well below the latest close of $27.

Common mistakes

  • Treating every crossover as a reliable signal, especially in sideways markets.
  • Comparing an SMA on one chart with an EMA of the same length on another.
  • Forgetting that a moving average reacts only after the price has already moved.

This glossary is for education only and is not investment advice. Examples use hypothetical numbers.

All glossary terms