WhitmanTrading

Moving Average Crossover: Count the Crosses

A moving average crossover is the moment a shorter-period average moves through a longer one, treated as a change in trend. The gap between the two periods decides how many signals the system produces, and on this site's shared history that count ranges from 57 down to 3 on identical price data.

How it works

A candlestick chart of the site's shared price history. The headline on the chart reads: One average crossing another.
One average crossing another. Illustrative chart - not real market data.

Put two moving averages of different lengths on a chart. When the shorter one moves from below the longer one to above it, that is a bullish crossover; the other way round is a bearish one.

The logic is that the short average summarises recent price and the long one summarises older price, so a cross means recent has overtaken older. That is a fair description of what the event is.

A gently rising stretch of the long price series. The headline on the chart reads: The cross always arrives after the price cross.
The cross always arrives after the price cross. Illustrative chart - not real market data.

What it is not is new information. For the short average to cross the long one, price has to have crossed both of them first — the averages are computed from price, so they cannot lead it. Every crossover is a delayed, smoothed confirmation of a move you could have seen on the chart earlier.

That delay is the trade being made. You accept lateness in exchange for filtering out moves that did not persist long enough to drag the averages through each other.

The number that decides everything: how many crosses

A calmly advancing stretch of the long price series. The headline on the chart reads: Twenty over fifty crosses eighteen times in 576 bars.
Twenty over fifty crosses eighteen times in 576 bars. Illustrative chart - not real market data.

On this site’s shared 576-bar history, a 20/50 pair of simple averages crosses 18 times — one signal roughly every 32 bars.

A flat but volatile stretch of the long price series. The headline on the chart reads: Five over ten crosses fifty-seven times on the same data.
Five over ten crosses fifty-seven times on the same data. Illustrative chart - not real market data.

A 5/10 pair on exactly the same bars crosses 57 times — one every 10 bars.

A long-horizon candlestick view of the same price series. The headline on the chart reads: And fifty over two hundred crosses three times.
And fifty over two hundred crosses three times. Illustrative chart - not real market data.

A 50/200 pair crosses 3 times — one every 192 bars. Same market, same period, same price action: 57 decisions, or 18, or 3.

A strongly rising stretch of the long price series. The headline on the chart reads: The separation of the two periods sets the signal count.
The separation of the two periods sets the signal count. Illustrative chart - not real market data.

That range is the whole system. Before you have any view on whether crossovers work, the setting you choose has already decided how often you will trade, how much you will pay in costs, and how much screen time the method demands. Those are the consequences you can know in advance — unlike the results, which you cannot.

The intermediate pairs fill in the curve predictably: 9/21 crossed 32 times, 10/30 crossed 25 times, 50/100 crossed 11 times. Wider separation, fewer signals, monotonically.

In practice: what the filter actually filters

A flat, quiet stretch of the long price series. The headline on the chart reads: Most of the fast crosses reverse within a few bars.
Most of the fast crosses reverse within a few bars. Illustrative chart - not real market data.

On this history, the average run of consecutive closes in one direction is 2.01 bars and the longest is 11. A 5-period average is summarising a window barely longer than the typical run, which is why fast pairs cross so often: they are tracking noise at the scale noise occurs at.

A 72-bar candlestick section of the shared price history. The headline on the chart reads: A longer filter removes signals, not losses specifically.
A longer filter removes signals, not losses specifically. Illustrative chart - not real market data.

Here is the part that is usually skipped. Lengthening the averages removes signals — but it removes them from both ends of the distribution. The whipsaws go, and so do the early entries into the moves that worked. A slower system is not a more accurate one; it is a smaller one.

Which means “use longer averages to avoid whipsaws” is only half a sentence. The full version is “use longer averages to trade less often, accepting later entries, in exchange for fewer reversals” — and whether that is a good trade depends on things a crossover system cannot see.

A candlestick chart with a volume histogram beneath it, with the volume histogram emphasised. The headline on the chart reads: No crossover system looks at participation.
No crossover system looks at participation. Illustrative chart - not real market data.

No crossover looks at volume, news, session, or anything except two summaries of past closes. It is one of the purest examples of a system operating on a single input, which is worth knowing before adding a second indicator that is also computed from closes and calling it confirmation.

A candlestick series containing several opening gaps, with the largest opening gap marked. The headline on the chart reads: A gap can cross both lines before you can act.
A gap can cross both lines before you can act. Illustrative chart - not real market data.

A gap can complete a cross overnight, so the signal appears at a price you could never have transacted at. Backtests that assume entry at the signal bar’s close quietly overstate what a real account would have got.

A declining stretch of the long price series, with the entry price and the level at which a stop would trigger drawn as horizontal lines. The headline on the chart reads: Exiting on the opposite cross gives back the turn.
Exiting on the opposite cross gives back the turn. Illustrative chart - not real market data.

Most crossover systems exit on the opposite cross, which means giving back the whole turn every time. The exit is as late as the entry, by symmetry. Adding a separate stop fixes that and turns the system into two systems with two sets of assumptions.

A candlestick chart of the site's shared price history, annotated with the round-trip cost. The headline on the chart reads: Eighteen crosses at a share of a bar is the real bill.
Eighteen crosses at a share of a bar is the real bill. Illustrative chart - not real market data.

Each signal costs 2% of a typical bar’s range in round-trip costs on this history. Eighteen crosses is a modest bill; 57 is three times that for the same underlying moves, which is a cost difference you can compute before choosing a setting rather than discovering afterwards.

What a crossover is not

It is not a leading indicator. Both lines are built from closes that already happened.

It is not two pieces of evidence. Two averages of one price series are one measurement expressed twice, which the confluence page treats in detail. A cross is a single fact about the shape of recent price.

It is not the same system on every timeframe. The count depends on the ratio of periods and the character of the bars, so a 20/50 on a five-minute chart and a 20/50 on a daily chart are different systems that happen to share a label.

And it is not a complete method. It has an entry and an exit. It has no position sizing, no risk per trade, and no rule for what to do in the conditions it handles worst.

When it fails

A sideways, range-bound candlestick series. The headline on the chart reads: In a range the two lines braid around each other.
In a range the two lines braid around each other. Illustrative chart - not real market data.

In a range the two lines braid. Price oscillates around a mean, both averages sit near that mean, and they cross repeatedly with no move in between to pay for the costs. This one regime accounts for most of what crossover systems lose.

The second failure is the period search. Testing dozens of pairs on one history and keeping the best is fitting to that history. The 20/50 that looks best on 576 bars was chosen from a menu of options that all had similar prior claims, and the winner is largely the luckiest.

A third is asymmetric attention. People remember the cross that caught a large move and forget the eleven that did not, which is how a system with a low hit rate feels reliable.

A fourth is stacking crossovers. Requiring a 5/10 and a 20/50 to agree does not add independent evidence — it just delays the signal until the slower pair fires, which is the same as trading the slower pair on its own.

And a fifth is changing the pair after a losing streak. The system did not break; the market changed regime. Switching to the pair that would have worked over the last three months is optimisation dressed as adaptation.

The original data

Counted on the same 576 bars: 5/10 crossed 57 times, 9/21 crossed 32, 10/30 crossed 25, 20/50 crossed 18, 50/100 crossed 11 and 50/200 crossed 3. Those counts are in research/series-measurements.json, computed by site/measure_series.py, and they are the same series every chart on this site is drawn from.

A 72-bar window of the shared price history, cut short at the decision bar. The headline on the chart reads: The cross fired yesterday and price is up. Enter?
The cross fired yesterday and price is up. Enter? Illustrative chart - not real market data.

Run this count on your own instrument before you run a backtest on it. The number of crosses per year is knowable in advance, it is the input to your cost estimate, and it is the one property of a crossover system that does not depend on any assumption about whether crossovers work. A pair that hands you a decision every ten bars is a different life from one that hands you three a year, and that difference is decided by the setting, not by the market.

Golden cross is the specific 50/200 case, and the one with three events behind it here. Simple moving average explains what each line is actually computing. And trend following is the approach a crossover system is a crude implementation of.

What I actually do

Counting the crosses is the exercise I wish someone had made me do in my first year. I had an opinion about which pair was best and no idea that one of them was going to ask me for a decision every ten bars. The count is the cost, and I was choosing a cost without looking at it.

— Michael Whitman

This page is educational, not financial advice. Test every idea on your own charts before risking money.