Trends/Moving averages

Exponential moving average

A moving average that gives more weight to recent prices, so it reacts faster than a simple average.

Moving averagesBest on 3M, 6M, 1YAlso called EMA
Exponential moving average diagramIllustration of the exponential moving average shape. It is a sketch, not real price data.EMA (turns sooner)SMA
Illustration of the exponential moving average shape. It is a sketch, not real price data.

What it shows

An exponential moving average (EMA) is calculated step by step. Each new value takes a share of the newest close and the rest from the previous EMA. The share is 2 ÷ (N + 1).

Old prices never drop out completely. They just count for less and less. The result follows price more closely than an SMA of the same length.

How we find it

The same code that draws it on your chart follows these steps, with the same result every time.

  1. Choose N and compute the weight α = 2 ÷ (N + 1).
  2. Start with the SMA of the first N closes.
  3. For each new bar, EMA = α × close + (1 − α) × previous EMA.
  4. Plot the result.

Starting values: N 9, 21, 50 and 200 shown; Weight 2 ÷ (N + 1). These are proposed and will be tuned on real price data before launch.

How to read it

  • The blue line is the EMA and the gray dashed line is an SMA of the same length for comparison.
  • The EMA turns earlier than the SMA.
  • Price above the EMA means the last close is above a recency-weighted average.

Status labels you may see

LabelWhat it means
Above the averageThe last close is above the EMA.
Below the averageThe last close is below the EMA.
CrossingPrice crossed the EMA in the last 3 bars.

What cancels it

Nothing cancels it.

What traders check next

  • How the EMA compares with the SMA.
  • The slope of the line.
  • Whether price pulled back to the line and turned.

Limits

  • Faster means more false crosses in choppy markets.
  • The first values depend on the start.
  • It still lags price.

Try it in forecastviz

  • Open any ticker and choose Moving averages → Exponential moving average in the left menu.
  • Switch between 3M, 6M, 1Y to see how the picture changes.
  • Compare with Simple moving average and Double exponential moving average on the same chart.

Questions

Why use EMA instead of SMA?

It reacts faster to recent moves, which some traders prefer.

Is it more accurate?

Not necessarily. It is more responsive and also noisier.

Related trends

Further reading

  • Murphy, Technical Analysis of the Financial Markets
  • Kaufman, Trading Systems and Methods
  • Achelis, Technical Analysis from A to Z

Educational only. Not financial advice, and not a price forecast. Charts are drawn by code from past price data, which may be delayed.