Skip to content
AlgoBeam

MACD

A trend-following momentum indicator built from the distance between two exponential moving averages, with a signal line drawn on top of it.

IndicatorsBeginner2 min read

What it is

Moving Average Convergence Divergence, designed by Gerald Appel in the late 1970s, turns the distance between two exponential moving averages into an oscillator. It is a trend-following tool dressed as a momentum indicator: when the fast average pulls away from the slow one the trend is accelerating, and when the two converge it is losing force.

How it works

The standard configuration is 12, 26, 9. The MACD line is the 12-period EMA minus the 26-period EMA. The signal line is a 9-period EMA of the MACD line. The histogram plots the difference between the two and therefore measures the rate of change of that spread. Because the MACD line is expressed in the price units of the instrument, its absolute values are not comparable between a $12 stock and a $4,000 index; only its shape and its position relative to zero carry information.

How traders use it

Traders read four things from it: a crossover of the MACD line above or below its signal line as a momentum trigger, a cross of the zero line confirming that the shorter average has overtaken the longer one, expansion and contraction of the histogram as an early read on acceleration, and divergence between the oscillator and price at swing extremes. On higher timeframes the zero-line state is often used simply as a regime filter for other rules.

Where it breaks down

Its weaknesses follow directly from its construction. Two smoothed averages lag, so signals arrive after a decent part of the move has already happened. In sideways markets the line oscillates around zero and produces a steady stream of crossovers that lose money on costs alone. The histogram tempts users into calling turns early, before any level has broken. And because MACD values scale with price, threshold rules copied from one instrument to another are meaningless; normalise by price or by ATR if you need a version that travels.

Educational reference. This entry describes how a concept is defined and used. It is not investment advice, not a recommendation, and not a signal. Any rule you build from it should be tested with realistic costs before it is traded, and no historical result guarantees a future one.

Ready when you are

Now go and test it.

Reading about MACD tells you how it is supposed to behave. A backtest tells you how it actually behaved on your instrument, over your timeframe, with costs included.

  • No card required
  • Cancel anytime
  • 14-day Ultimate trial