MACD Strategies: Signal-Line Crosses, Histogram Turns and the Zero Line, Graded Separately

8 min readQuantParadox research

MACD is three indicators wearing one name: a difference of averages, a smoothed copy of that difference, and the gap between the two. Each produces its own signal, they fire at different times with different frequencies, and a backtest that pools them is grading a rule nobody trades.

The short answer

A MACD strategy is a trend-following trading rule built from the difference between two exponential moving averages, and the signal-line cross, the histogram turn and the zero-line cross are three different rules with different trade counts that a backtest should grade separately.

What does MACD actually measure?

MACD measures the distance between a faster and a slower exponential moving average of price, so its value is a reading of medium-term momentum, and its signal line is a further average of that distance, so the two together describe momentum and its recent trend.

The default construction uses a twelve-period and a twenty-six-period average for the main line and a nine-period average of the main line as the signal. When the fast average is above the slow one the line is positive and the market has been rising over the medium term; the further apart they are, the stronger the recent move. The histogram is simply the main line minus the signal line, and it turns before either line crosses.

It is worth being clear that all of this is derived from price alone with no new information. MACD summarises what a pair of moving averages already show, which is why a MACD rule should always be compared against a plain moving-average crossover using the same two periods. If the MACD rule cannot beat that, the extra machinery is not earning its place.

Because it is built from averages, MACD lags, and every signal it gives is a statement about what has happened rather than what is starting.

Which of its three signals are you testing?

The three signals are the signal-line cross, the histogram turn, and the zero-line cross, and they are three separate rules with different frequencies, different lag and different results.

The signal-line cross fires when the main line crosses its own average. It is the most common MACD rule and the most frequent signal of the three, occurring on every medium-term change of momentum, including a great many small ones in a ranging market.

The histogram turn fires when the gap between the two lines stops widening and starts narrowing. It leads the signal-line cross by construction and therefore fires earlier and more often, with a larger share of false starts. Some rules use it as an early warning rather than an entry.

The zero-line cross fires when the main line changes sign, which is exactly when the two underlying averages cross. It is the slowest and rarest of the three and is identical to a moving-average crossover on the same periods. A test of it is a test of that crossover under another name.

Why do the settings decide the result?

The settings decide the result because the three periods control how much the indicator lags and how often it fires, and the trade-off between missing the start of a move and being whipsawed inside a range is set entirely by those numbers.

Shorter periods react faster and fire more often, which on a trending history captures more of each move and on a ranging history produces a stream of small losses. Longer periods do the reverse. There is no setting that is right for both, and a setting that scores well on a history does so partly because that history had a particular mix of trending and ranging periods.

The default settings have no special status. They are conventions from a different era and a different market, and treating them as a baseline is reasonable only because they are widely used, not because they are known to work. A test that reports the default result and stops has reported one point on a surface.

The parameter surface across the three periods is the honest picture, and it is where the stability question is answered. A broad region of similar results is a rule tuning into something persistent; a single good cell is the noise lining up.

What does a fair MACD test look like?

A fair MACD test grades each of the three signals separately, compares each against a plain moving-average crossover on the same periods, includes a stated trend or volatility filter if the rule uses one, charges realistic costs, and reports the out-of-sample result with its trade count.

The comparison against the crossover is the control. MACD contains no information the two averages do not, so the question is whether the way it presents that information, as a cross of the difference against its own average, produces better-timed entries than the averages crossing each other. That is an empirical question and the answer is often no.

Costs matter more for MACD than for slower rules because the signal-line cross fires often. A rule that trades on every cross on an hourly chart produces a trade count that looks like a large sample and an expectancy that the spread erodes. Grading in R after costs is the only reading that survives.

The filter question is the one that turns MACD from a standalone rule into a component. Requiring the signal to agree with a higher-timeframe trend, or with a volatility condition, changes the trade set substantially, and the filtered and unfiltered results should both be shown.

How does QuantParadox grade a MACD rule?

QuantParadox exposes the MACD line, its signal line and the histogram as separate values, each available on the entry timeframe or on a higher timeframe as of the last completed bar, so the three signals are three different conditions and are graded as such.

The higher-timeframe version is the input most filtered rules need, and reading it from the last completed higher-timeframe bar is what prevents the leak that hand-built versions of this rule usually contain, where a four-hour MACD is sampled mid-bar.

The limitation to state is one of implementation rather than design. Exponential averages are seeded differently across platforms, and a MACD value on this platform may differ slightly from the same setting on another, especially early in a series. A rule ported from a charting package should be checked for agreement on a sample of bars before its results are compared.

The control comparison, the MACD rule against the plain crossover on the same periods, is two rules run on the same history, and the out-of-sample split applies to both.

Questions people actually ask

What are the best MACD settings for forex?

There is no best setting, and the default twelve, twenty-six and nine has no special claim beyond being the convention. Shorter periods fire more often and suffer more in ranges; longer periods lag more and miss the start of moves. The useful procedure is to map the result across a grid of the three periods, look for a broad region of similar results rather than a single peak, choose near the centre of that region, and confirm the choice on history that was not used to draw the map.

Is MACD better than a moving average crossover?

Not by construction, because MACD is built from the same two averages and contains no additional information. Whether the signal-line cross times entries better than the underlying crossover is an empirical question for a specific market and period, and the fair test runs both rules on the same history with the same costs. The zero-line cross is exactly the crossover, so it cannot differ from it at all.

Should you trade the MACD histogram or the signal line cross?

They are different signals and the answer is whatever the comparison on your history shows. The histogram turn fires earlier and more often, with more false starts; the signal-line cross fires later with fewer. Neither is generally better, and a rule that uses the histogram as a warning and the cross as the entry is a third rule with its own result. Grade each separately, with its trade count and out-of-sample result, before deciding.

The only backtest that settles it is yours.

Build a strategy from a sentence, paste your own Python, or import your live trade history and have it graded. Five full backtests free, no card, and we'll tell you plainly when the result is indistinguishable from luck.

We publish research and tooling, not trading advice, and we make no claim about future returns. Everything above describes how to test an idea — not a reason to trade one.