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

Explainer

What is a moving average?

A moving average is the average of the last N prices, recalculated on every new bar, so it makes a smooth line that follows price with a delay.

Updated

The short answer

A moving average is the average of the last N prices, usually closing prices, recalculated on every new bar. Plot the results and you get a smooth line that follows price with a delay.

It moves because the window moves. When a new bar arrives, the oldest bar drops out of the window and the newest comes in. The number N is the period. A larger N gives a smoother line and a longer delay.

Moving average
The average of the last N prices, recalculated on each new bar.
Simple moving average (SMA)
The plain average. Add the last N closes and divide by N. Every bar in the window counts equally.
Exponential moving average (EMA)
An average that gives the newest bars more weight and lets old bars fade out gradually.
Period
N, the number of bars the average looks back over.

Simple against exponential

The simple average adds the last N closes and divides by N. A bar that leaves the window stops counting at once, which can make the line step when a big bar drops out.

The exponential average uses the formula EMA today = close × k + EMA yesterday × (1 − k), where k = 2 ÷ (N + 1). Recent closes count for more and old closes fade out gradually. The line reacts sooner than the simple average of the same period.

What a moving average is for

It does two jobs. It smooths price, so a rough series of bars becomes a line you can read. And it gives you a rule you can state without judgement: price is above the line or below it, a fast line is above a slow line or below it.

That second job is why moving averages show up in rules. A rule such as “enter when the fast average crosses above the slow average” can be written down exactly. It leaves no room for a second reading, which makes it testable.

A moving average replaces a judgement with a definition. That is why it can be tested, and testing is the only way to find out what it does.

What a moving average cannot tell you

It describes the past. Every value is built from bars that have already closed, so the line is always behind price. The longer the period, the further behind.

It also cannot tell you where to get out, how much to risk or whether the next move continues. And in a sideways market it gives frequent crossings that carry little information. A line on a chart looks like structure. It is arithmetic on old prices.

The futures angle

The period counts bars, so the timeframe sets the clock time. A 50-period average on a 1-minute chart covers 50 minutes. On a daily chart it covers 50 sessions.

Futures contracts expire and trading moves to the next month, usually at a different price. An average across that change mixes two contracts, so a futures test needs a clear rule for rolls. In ours, the front month is chosen by volume, prices are not back-adjusted and no trade is held through a roll. A moving-average cross is also one of the presets in our builder.

Replay it on real NQ data, free, in the Trade Lab.

Questions and answers

What is a moving average in simple terms?

It is the average of the last N prices, updated on every new bar. Drawn on a chart, it is a smooth line that follows price.

What is the difference between an SMA and an EMA?

The SMA weights every bar in the window equally. The EMA weights recent bars more, so it reacts sooner. Both lag price.

What period should a moving average use?

There is no single right period. A short one follows price closely and gives more crossings. A long one is smoother and later. Pick the period your rule states, then test that exact one.

Is a moving average a leading or lagging indicator?

It lags. It is calculated from closed bars, so it can only describe what price has done.

Can a moving average be backtested on futures?

Yes. Write the rule so it has one reading, add commission and slippage, handle contract rolls, and run it on past data. A backtest shows what the rule would have done, not what it will do.