NEW Trade AnalyticsExplore the demo
Setup library
October 22, 2026FrançaisEspañol

EMA 9 and EMA 21: what they show, and how to test them

Two exponential moving averages, 9 and 21 bars, are a common way to read short-term trend: the fast one above the slow one means the recent closes are rising. QuantLogic has two kinds of ideas with them: the trend state itself, and a pullback to the EMA 21 inside that trend.

EMA 21Pullback
The level the idea readsThe bar where the idea firesA drawn example, not market data.

What it is

An EMA weighs recent closes more than older ones, so it turns faster than a simple average.

EMA 9 above EMA 21 is a state that lasts many bars, not a single cross.

The exact rule QuantLogic uses

The trend on five-minute bars, and the pullback on one-minute bars. The downtrend versions are the mirror image.

  1. EMA 9 above EMA 21 (5-min): at this bar, the five-minute EMA 9 is above the five-minute EMA 21. Every bar counts while it stays above.
  2. Pullback to EMA 21 in an uptrend: the five-minute EMA 9 is above the EMA 21, and this one-minute bar's low reaches the one-minute EMA 21 while it closes above it.

When is it known? Known when the bar closes. The five-minute averages use the last five-minute bar already closed.

Versions you can build

  • EMA 9 above EMA 21 (5-min). Every bar while the fast average is above the slow one.
  • EMA 9 below EMA 21 (5-min). Every bar while it is below.
  • Pullback to EMA 21 in an uptrend. A dip to the 1-minute EMA 21 that closes above it.
  • Pullback to EMA 21 in a downtrend. A rally to it that closes below it.

What to look at around it

In QuantLogic, every time the idea happened is laid out with the data points around it, so you can see where it held and where it didn't:

Time of day and sessionEconomic calendar and newsVWAP distanceGamma regime, flip and wallsYesterday's value area and pivotsVolatilityNQ vs ES since the openUp or down on the day

Traps when you test it

  • Counting the state as one event. EMA 9 above EMA 21 fires on every bar while it holds; it describes the market, it is not a single entry.
  • Late trends. A pullback after a long trend is not the same as the first one; time and distance are data points.
  • Testing only the uptrend. Check the downtrend versions too.

Build it and test it yourself

Open EMA 9 above EMA 21 (5-min) in Build with QuantLogic. See every time it happened on NQ, ES, Gold or Crude since September 2025, check the long and the short side, add your own filters and run the luck test.

Nothing is proven until it holds live. We give no trading signals and no advice, we never hold your money or your accounts, and we never trade for you.

Questions

Is there an EMA crossover idea?
The state is the starting idea here. You can see where it began on the chart, and narrow it with filters.
Why 5-minute for the trend and 1-minute for the pullback?
The slower trend is read on five-minute bars; the dip into it is timed on one-minute bars.

Related setups

Educational content, not investment advice. Futures trading involves substantial risk of loss. See the risk disclosure.