Trends/Moving averages

9 and 21 EMA crossover

The 9-bar EMA crossing the 21-bar EMA, a fast pair used on shorter time frames.

Moving averagesBest on 3M, 6MAlso called 9/21 cross
9 and 21 EMA crossover diagramIllustration of the 9 and 21 EMA crossover shape. It is a sketch, not real price data.Cross
Illustration of the 9 and 21 EMA crossover shape. It is a sketch, not real price data.

What it shows

This pair is faster than the 20 and 50. The 9 follows price closely and the 21 follows it more slowly. Their crossings show when the very recent trend changes relative to the short-term trend.

Because the averages are quick, crossings come often. The cross is a fact about two lines, not a prediction.

How we find it

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

  1. Compute the 9-bar EMA and the 21-bar EMA.
  2. Mark a cross when the 9 moves from below the 21 to above it, or the reverse.
  3. Show the date and price of each cross.
  4. Count crosses in the period shown.

Starting values: Short 9; Long 21; Type EMA. These are proposed and will be tuned on real price data before launch.

How to read it

  • The blue line is the 9 and the gold line is the 21.
  • Gold dots mark the crosses.
  • Many crosses close together means a choppy market.

Status labels you may see

LabelWhat it means
9 above 21The fast average is above the slow one.
9 below 21The fast average is below the slow one.
Just crossedA cross happened in the last 3 bars.

What cancels it

A cross back the other way ends the state.

What traders check next

  • How many crosses happened in the last 30 bars.
  • The slope of both lines.
  • Whether price is above both.

Limits

  • Many false crosses in sideways markets.
  • Lags price.
  • Fast pairs are noisy.

Try it in forecastviz

  • Open any ticker and choose Moving averages → 9 and 21 EMA crossover in the left menu.
  • Switch between 3M, 6M to see how the picture changes.
  • Compare with 20 and 50 average crossover and Exponential moving average on the same chart.

Questions

Is this better than 20/50?

It is faster, so it reacts earlier and gives more crosses.

Which period is it for?

Shorter time frames: 3M and 6M daily charts.

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.