Ezebees Tech Limited Terminal

Moving-Average Crossovers Explained: What They Measure and Where They Fail

Published · By Eze Sochima

A moving average smooths a price series so that its general direction is easier to see. A crossover rule turns that smoothing into a signal. Both are simple ideas, and both have limitations that are worth understanding before relying on them.

Educational content only, not financial advice; trading carries risk of loss. Nothing here is a recommendation to buy or sell any asset. Examples use simple illustrative numbers, not real results. Please also read the Disclaimer.

What a moving average is

A simple moving average (SMA) is the arithmetic mean of the last n closing prices. A 20-period SMA on a daily chart is the average of the last 20 daily closes; each day, the oldest close drops out and the newest is added, so the average "moves". The result is a smoother line than price itself, because single unusual days have less effect on an average of many.

An exponential moving average (EMA) gives more weight to recent prices and less to older ones, with the weights falling off gradually rather than stopping abruptly after n periods. Because of that weighting, an EMA reacts to new prices somewhat faster than an SMA of the same length. Neither is better in general; they are different trade-offs between smoothness and responsiveness.

The length of the average is a choice, not a law. Short averages follow price closely and change direction often. Long averages are smoother and change direction rarely. Commonly quoted lengths, such as 20, 50 or 200 periods, are conventions that many chart users happen to share, not values with special predictive power.

Lag is built in

Every moving average lags price, because it is made from past prices. A 50-day SMA tells you where the average price of the last 50 days has been, which is roughly where price was about 25 days ago in a steady trend. When the market turns, the average keeps moving in the old direction for a while before it catches up.

Lag is the price paid for smoothing. Making the average shorter reduces lag but lets more noise through. Making it longer reduces noise but increases lag. There is no setting that removes both, and anyone tuning a moving average is choosing a point on that trade-off.

How a crossover rule works

A crossover rule compares two lines and acts when one crosses the other. Two common versions are:

A two-average crossover is, in effect, a rough measure of whether recent prices are higher or lower than prices over a longer window. That is why crossover rules are usually described as trend-following: they attempt to participate in moves that have already started, rather than to predict turning points.

Where crossovers tend to struggle

Trend-following rules depend on trends. In markets that move sideways within a range, the fast and slow averages tangle together and cross back and forth. Each cross produces a signal, the signal is reversed shortly afterwards, and each round trip pays the spread, commissions and any slippage. These repeated small losses are often called whipsaws, and they are an expected feature of crossover rules, not a malfunction.

Lag also means that, even in a trend, entries come after part of the move has already happened, and exits come after part of the move has already reversed. A crossover rule therefore gives up the beginning and end of each move in exchange for, hopefully, some of the middle. Whether that exchange is worthwhile depends on the market, the period studied and the costs involved, and it can change over time.

Gaps and sudden events can also cause large moves between one bar and the next. A rule that acts on closing prices cannot respond until the bar has closed, so the moving average cannot protect against moves that happen faster than its inputs are updated. For that reason crossover signals are not a substitute for planned stop-losses and position sizing.

The temptation to optimise

Because a crossover rule has only a few settings, such as the lengths of the two averages, it is easy to test many combinations on historical data and pick the one with the best result. This is where many people fool themselves. With enough combinations, one will look good on any particular stretch of history purely by chance. The best-looking pair of lengths on past data is often not the best on future data, a problem known as overfitting.

Some practical safeguards are:

The article on backtesting, paper trading and live trading covers these pitfalls in more detail.

Reading a crossover in context

Moving averages are often more useful as descriptions than as triggers. Asking "is price above or below its long-term average, and is that average rising or falling?" gives a quick summary of the recent trend that can sit alongside other observations, such as the structure of recent highs and lows on a candlestick chart, or changes in volume. Used that way, the average is a lens for organising what has already happened, not a forecast.

If you do use a crossover as part of a written plan, define it precisely: which average type, which lengths, which price (usually the close), which timeframe, whether the signal is acted on at the close or the next open, and what happens to open positions when a signal reverses. Vague rules such as "buy when the averages look like they are crossing" cannot be tested or reviewed.

Practising on paper first

A crossover rule is a good candidate for paper trading because it is mechanical. Record each signal in a paper ledger exactly as the rules define it, including the signals you would rather skip. Over a meaningful number of trades, you will see how often whipsaws occur, how long losing stretches last, and whether you can follow the rule when it feels wrong. That information is more valuable than any single backtest figure.

Moving averages and crossovers are widely used because they are simple and transparent. Simplicity is a real advantage for learning and testing. It does not make them reliable predictors, and no setting turns them into one.