🎯 In 30 seconds: MACD is the gap between a fast and a slow exponential moving average. The signal line is a smoothed copy of that gap, and the histogram is the distance between the two. The histogram measures whether the gap is widening or narrowing, so it turns first and gives the earliest, noisiest hints. The zero line is just the point where the two averages cross. Because MACD is in dollars, the percentage version (PPO) is better for comparing stocks or long histories.
Three lines from two averages
Gerald Appel developed MACD in the late 1970s. With the default settings (12, 26, 9):
- MACD line = 12-bar EMA of closes minus 26-bar EMA of closes.
- Signal line = 9-bar EMA of the MACD line.
- Histogram = MACD line minus signal line.
Each EMA updates with a weight of 2 / (n + 1). That is 0.1538 for 12 bars, 0.0741 for 26 bars and 0.2 for the 9-bar signal. The fast average reacts about twice as strongly to each new close as the slow one, which is what opens and closes the gap.
One update by hand
A hypothetical stock, MERI, ends yesterday with a 12-bar EMA of $100.00, a 26-bar EMA of $98.00 and a signal line of 1.60. So yesterday’s MACD was 2.00 and the histogram was 0.40. Today MERI closes at $104.
| Step | Calculation | Result |
|---|---|---|
| New 12-bar EMA | 100.00 + 0.1538 × (104 minus 100.00) | 100.62 |
| New 26-bar EMA | 98.00 + 0.0741 × (104 minus 98.00) | 98.44 |
| MACD line | 100.62 minus 98.44 | 2.17 |
| New signal | 1.60 + 0.2 × (2.17 minus 1.60) | 1.71 |
| Histogram | 2.17 minus 1.71 | 0.46 |
The histogram grew from 0.40 to 0.46 because MACD rose faster than its own average. If MERI had closed flat at $100 instead, the 12-bar EMA would stay at $100.00, the 26-bar EMA would rise to about $98.15, MACD would shrink to about 1.85 and the histogram would drop to about 0.20. One quiet day is enough to shrink the bars.
Why the histogram turns first
Think of the three lines as position, speed and change in speed. The gap between the averages (MACD) tracks the trend. The histogram tracks whether that gap is still growing. A trend can keep rising while it slows down, so the histogram usually peaks before MACD does, and MACD usually peaks before price does.
Two facts tie the lines together:
- The histogram crosses zero on the same bar that MACD crosses its signal line. They are one event drawn two ways.
- MACD crosses zero on the same bar that the 12-bar EMA crosses the 26-bar EMA. A zero-line cross is a moving-average crossover, covered in Moving averages in practice.
How people read MACD
| Event | What it says | Timing |
|---|---|---|
| Histogram shrinks | The trend is losing speed | Earliest, many false alarms |
| MACD crosses signal | Short-term momentum has turned | Middle |
| MACD crosses zero | The fast average is now on the other side of the slow one | Latest, fewest flips |
| Signal cross far from zero | A turn after a stretched move | Often reads as more meaningful |
| Signal cross hugging zero | Small wiggles in a flat market | Usually noise |
A common way to combine them: let the zero line set the bias and use signal crosses for timing. While MACD is above zero, only bullish crosses count. While it is below, only bearish ones count. This cuts the number of trades and removes many of the crosses that happen against the trend.
Many traders also run MACD on a weekly chart to judge the larger trend, then time entries on daily bars. The chapter on multiple time frames covers that method.
PPO: the percentage version
The Percentage Price Oscillator uses the same averages but divides by the slow one: PPO = (12-bar EMA minus 26-bar EMA) / 26-bar EMA × 100. The signal line and histogram are built the same way.
Why it matters, with two hypothetical stocks:
- Stock A trades near $20. Its 12-bar EMA is $20.40 and its 26-bar EMA is $20.00. MACD = 0.40. PPO = 0.40 / 20 × 100 = 2.0%.
- Stock B trades near $400. Its 12-bar EMA is $404 and its 26-bar EMA is $400. MACD = 4.00. PPO = 4 / 400 × 100 = 1.0%.
MACD makes stock B look ten times stronger. PPO shows that A’s fast average sits twice as far above its slow average. The same problem appears on one stock over many years. If a stock grew from $10 to $100, its MACD swings late in the chart will be roughly ten times larger than early on. PPO keeps old and new readings on one scale.
The same recipe applied to volume instead of price is the Percentage Volume Oscillator (PVO). It shows whether recent volume is running above or below its longer average.
Settings
12, 26 and 9 are the standard and what most people see, which is the main argument for keeping them. Shorter settings react sooner and flip more. Longer settings, or the same settings on weekly bars, filter out more noise and arrive later. There is no setting that is correct for every stock. If you change them, change them once for a reason you can explain, not after scanning many combinations for the best past result.
MACD is also a common tool for spotting disagreement between price and momentum. That reading has enough traps to need its own chapter: Divergence.
- MACD is 1.20 and the signal line is 1.50. What is the histogram, and what has just happened if it was positive yesterday? Answer: minus 0.30. MACD has crossed below its signal line, a bearish signal cross.
- MACD just crossed above zero. Which moving averages crossed? Answer: The 12-bar EMA crossed above the 26-bar EMA.
- A $50 stock has a 12-bar EMA of $51 and a 26-bar EMA of $50. What is its PPO? Answer: 1 / 50 × 100 = 2.0%.
- Why does the histogram often peak while price is still rising? Answer: It measures whether the gap between the averages is growing. A trend that keeps rising at a slower pace makes the gap grow more slowly, so the bars shrink before price turns.
Sources
- Gerald Appel, Technical Analysis: Power Tools for Active Investors (2005), MACD construction and use
- John J. Murphy, Technical Analysis of the Financial Markets (1999), MACD and the histogram
- Brock, Lakonishok and LeBaron (1992), “Simple Technical Trading Rules and the Stochastic Properties of Stock Returns,” Journal of Finance
- Sullivan, Timmermann and White (1999), “Data-Snooping, Technical Trading Rule Performance, and the Bootstrap,” Journal of Finance
- Moneydesks Technical Analysis tool: Indicator guide entries for MACD, PPO and PVO