CE Market SolutionsTest your own version of this rule on 10 years of NQ.Backtest your version →

Explainer

What is the 20 EMA and 50 EMA?

The 20 EMA and 50 EMA are exponential moving averages of the close over 20 and 50 bars, a slower pair that smooths more than the 9 and 21.

Updated

The short answer

The 20 EMA is an exponential moving average of the closing price over the last 20 bars. The 50 EMA is the same over the last 50 bars. Together they give a medium-term picture of where price has been.

Next to the 9 and 21, this pair is slower. It ignores more of the small moves and turns later. People use it to read the broader lean of price, and as two levels price sometimes slows down at.

20 EMA
An exponential moving average of the close over 20 bars.
50 EMA
An exponential moving average of the close over 50 bars.
Lag
The delay between a change in price and a change in the average. A longer period has more lag.
Pullback
A short move against the larger direction of price.

How it is calculated

The calculation is the same as for any EMA: EMA today = close × k + EMA yesterday × (1 − k), with k = 2 ÷ (period + 1). For the 20 EMA, k is 2 ÷ 21. For the 50 EMA, k is 2 ÷ 51.

Because the 50 EMA has the smaller k, each new close moves it less. That is the lag. A longer period gives a smoother line and a later signal. A shorter period gives a rougher line and an earlier one. Neither is free.

How people use the pair

One common reading is the order of the lines. The 20 above the 50 is read as an upward lean, and the 20 below the 50 as a downward lean. A cross of the two is read as the lean changing.

Another is to watch how price behaves when it comes back to a line. Some traders look at the 20 as a first place to watch and the 50 as a deeper one. Whether price reacts at either line is something you have to measure, bar by bar. It is not guaranteed by the line being there.

A slower average gives fewer crosses and later ones. Slower does not mean more reliable. It means later.

What the pair cannot tell you

Both lines trail price, so any signal from them arrives after the move has started. By the time the 20 crosses the 50, part of the move is behind you.

The pair also cannot tell a trend from a pause. In a sideways market the two lines flatten and tangle, and crosses stop meaning much. It gives no stop and no target, and no view of the size of the move.

The futures angle

A period is counted in bars, so a 50 EMA on a 5-minute chart looks back over 250 minutes of trading. On a daily chart it looks back over 50 sessions. The same number describes very different amounts of time.

Futures trade nearly around the clock, and a contract expires. An average that runs across a contract roll mixes the prices of two contracts, which is one reason how the data handles rolls matters. Our method keeps raw, unadjusted prices and holds no trade through a roll.

A backtest can tell you what a rule built on these lines would have done in every session of the history, with costs. Replay it on real NQ data, free, in the Trade Lab.

Questions and answers

What is the difference between the 20 EMA and the 50 EMA?

The period. The 20 EMA looks back over 20 bars and the 50 EMA over 50. The 20 follows price more closely, and the 50 is smoother and turns later.

What does it mean when the 20 EMA crosses the 50 EMA?

The medium average has moved from one side of the slower average to the other. It records a change in the lean of recent closes. It is not a forecast.

Is the 50 EMA support or resistance?

Some traders watch it as a level where price may slow down or turn. Whether price reacts there is a question for the data. The line alone does not make it so.

Which timeframe should I use the 20 and 50 EMA on?

Any. The period counts bars, so the timeframe sets how much clock time the lines cover. Choose it from the rule you are testing, and test on that same timeframe.