Moving Average Crossover

A field guide to the oldest line trick in charting

Two lines. One crossing. A lot of noise.

A moving average crossover is a chart event: a faster average of price moves through a slower one. It is simple to see, easy to code, and easy to misread. This site explains how it works and where it breaks, without hype.

Bullish crossoverFast average moves above slow. On a 50-day over 200-day pair, this is the “golden cross.”
Fast average (reacts sooner)Slow average (reacts later)Illustration on synthetic prices

What a crossover is, in one paragraph

A moving average smooths price by averaging the last N bars, so it trails the market. A short average trails less than a long one, which means the short one turns first. When the short (fast) average rises through the long (slow) average, that is a bullish crossover; when it falls through, a bearish one. The idea is that the fast line crossing the slow line marks a change in direction. The catch is the same trailing that makes the lines smooth: a crossover is always confirmed after the move has begun, and in a sideways market the lines cross back and forth with nothing to follow.

Crossover playground

Series #3

An illustration on synthetic, randomly generated prices. It is not a backtest, not real market data, and says nothing about how any setting would have performed. Try a short pair, then a long one, and watch how the number of crossings changes.

Fast averageSlow averageSynthetic priceFast crosses aboveFast crosses below
Average type
Price series

The slow length always stays at least one bar above the fast length. Crossings are counted where the two lines swap places, on every bar of the 160-bar series.

Five guides, no fluff

What a crossover can and cannot tell you

A crossover is a description of what price has already done, written as two lines. It can help you keep a consistent rule, stay on the right side of a sustained trend, and avoid staring at every candle. It cannot tell you what happens next, how long a trend will last, or whether a particular signal will be one of the many that reverse. Anyone quoting a win rate for a generic crossover is guessing; the result depends on the market, the timeframe, the costs, and the period you happen to look at.

Trading futures and other leveraged products carries substantial risk of loss. Treat everything here as education, and test any idea on a simulator before it touches real money.

Where to go from here

If you chart in NinjaTrader Desktop, NinjaTrader Guru has free step-by-step setup guides. Affordable Indicators builds indicators and tools for NinjaTrader 8, and you can browse the software listing. Two sister sites go deeper on tools and testing: indicators.ninja for indicator ideas and strategies.ninja on backtesting for how to test a rule honestly. Traders compare notes in the Trade With Excellence Discord.