Indicator Guide / Momentum
The gap between a fast and a slow average of price, and whether that gap is growing or shrinking.
MACD takes a fast 12-bar average of price and subtracts a slow 26-bar average. The result is the MACD line.
A 9-bar average of the MACD line is the signal line. The histogram bars show the gap between those two lines. When the MACD line is above zero, the fast average is above the slow one.
Fast–
−
Slow–
=
MACD line–
Signal line–
Histogram–
The MACD line is the gap between the fast and slow averages of price. The shaded band is that gap. The signal line is a 9-bar average of the MACD line. The histogram bars show how far apart those two lines are.
MACD line = 12-bar EMA of the closing price − 26-bar EMA. Signal line = 9-bar EMA of the MACD line. Histogram bars = MACD line − signal line. An EMA (exponential moving average) gives recent bars more weight. Each new bar counts for 2 ÷ (length + 1) of the new average.
“I was looking for a quality indicator that would be readily interpretable, that would not create so many whipsaws as to be confusing, and that would still be relatively simple to maintain.”
Appel, interviewed by Jayanthi Gopalakrishnan, Technical Analysis of Stocks & Commodities, September 2003.
Gerald Appel, Late 1970s. He dated it to about 1977. He wrote about it again in his 2005 book Technical Analysis: Power Tools for Active Investors. Appel started trading for himself in the mid-1960s. In 1973 he founded Signalert, an investment advisory firm. By 2003 its newsletter, Systems & Forecasts, had run for 30 years. In 1986 Thomas Aspray added the bars that show the gap between the MACD line and its signal line.
Whipsaws are signals that flip back and forth. MACD still makes them in sideways markets, as the charts below show.
MACD lags, because it is built from moving averages. In sideways markets its lines cross back and forth. StockCharts also warns about divergences in strong trends. Divergences that point down are common in a strong uptrend that keeps going.
On the chart below, find every time the MACD line crossed above its signal line. For each one, count the next 10 bars. Did price fall, go sideways or keep rising? On made-up prices, this shows you how to read the crosses. It does not test them.
Not measured on our data yet. A Library episode will test Gerald Appel's MACD against a popular online version, with fees and held-out data.
Indicators are public ideas. The words here are ours, with credit to each source. Information, not advice.