Definition · Technical Analysis
MACD: Moving Average Convergence Divergence, Line by Line
MACD, short for moving average convergence divergence, packs two exponential moving averages and their gap into one panel. Every line in it is an average of price, so every line trails price.
DefinitionSeen on: Chart
MACD An indicator made of the gap between a 12-period and a 26-period exponential moving average, a 9-period average of that gap called the signal line, and a histogram of the difference.
Also called Moving average convergence divergence, MACD histogram, MACD oscillator.
Put MACD on a chart only if that chart does not already carry moving averages. Every line in the panel is built from exponential moving averages of the close, so a chart with a 12-day and a 26-day EMA drawn over price already shows most of what MACD says, just in a different shape.
MACD line, signal line, histogram
- MACD line: the 12-period EMA minus the 26-period EMA.
- Signal line: a 9-period EMA of the MACD line.
- Histogram: the MACD line minus the signal line, drawn as bars.
The MACD line measures how far the fast average has pulled away from the slow one. The signal line smooths that gap. The histogram shows whether the gap is growing or shrinking against its own recent average. For how each EMA is calculated, see the exponential moving average.
Read each number as a statement. The short-term average is $1.30 above the long-term one. That gap is wider than its recent average. And the histogram is small, so the gap is only a little wider.
How it shows up on a chart
MACD sits in a panel under price. You see two lines, usually in contrasting colors, weaving around a horizontal zero line, with histogram bars rising above zero or hanging below it. The panel has no fixed top or bottom. On a $500 stock the values run bigger than on a $20 stock because the averages are in dollars, which also means you cannot compare MACD readings across stocks at different prices.
Most platforms label it with its settings, as in “MACD (12, 26, 9)”, and let you change them.
Crossovers are late by design
A bullish crossover is the MACD line moving above the signal line. A bearish one is the reverse. Both get treated as signals. The histogram crosses zero at exactly the moment the lines cross, since the histogram is nothing more than the distance between them, so bars flipping from positive to negative and a bearish crossover are one event drawn two ways.
They arrive late. The MACD line is a difference of two averages, and the signal line is an average of that difference, so a crossover is an average of averages catching up to a turn that price made several bars earlier, and by the time the lines cross, a good part of the move you hoped to catch is often already on the chart. On a trending stock the lag costs you the first leg. In a sideways market the lines cross back and forth near zero every week or two, and each cross is a small losing trade.
The zero line
The zero line is simpler than the crossovers and often more useful. When MACD is above zero, the 12-period EMA is above the 26-period EMA. When it is below zero, the short average is below the long one.
That’s all it says. A move from below zero to above zero is the same event as the 12-day EMA crossing the 26-day EMA on the price chart. Traders use it as a filter: take long setups only while MACD is above zero, short setups only while it is below.
Divergence on MACD
Like the relative strength index, MACD can diverge from price. Price makes a higher high while the MACD line makes a lower high, meaning the fast average is pulling away from the slow one less forcefully than last time. Treat it as a caution. Price often keeps going.
What people get wrong
Stacking indicators is the main one. MACD, a pair of moving averages and a momentum oscillator on the same chart can look like confirmation stacked on confirmation, but MACD and the averages are drawn from the same closes and agree because they are close to the same measurement. Swing trading indicators worth keeping makes the case for keeping one of each kind.
Another is trading every crossover. Without a trend filter, the crossovers in quiet stretches eat the gains from the trending ones. The rules for moving averages as a trend filter cover the same trade-off from the price chart side.
Related terms
Signal line, histogram, zero line cross and divergence are all parts of MACD. For the broader set of chart tools, see the technical analysis topic.
Questions traders ask next
What are the standard MACD settings?
The default is 12, 26 and 9: a 12-period EMA, a 26-period EMA, and a 9-period EMA of their difference for the signal line. Those settings came from daily charts and most platforms load them automatically. Faster settings give earlier crossovers and more false ones; slower settings give fewer and later ones.
What does it mean when the MACD histogram shrinks?
The MACD line is moving back toward its signal line, so the gap between the two moving averages has stopped widening. Price is still trending the same way while the histogram shrinks, just with less speed. A shrinking histogram often comes before a crossover, which is why some traders watch it as an early warning.