
At session 70, Harbor Coffee's chart shows a MACD of 1.373 beside a histogram of −0.211. Copying only the minus sign into a research note would lose half the story.
Harbor is our fictional coffee company. Its shorter price average is still above the longer one, but their gap is below its own recent average. The two readings describe different gaps in the same price history.
Follow the three calculations
MACD stands for moving average convergence/divergence. Where RSI compares gains with losses, MACD measures the gap between a faster and a slower price average. These exponential moving averages, or EMAs, give more weight to newer prices.
Our example uses a separate hypothetical set of daily closes after Harbor's year 3 snapshot, with no splits or dividends. Each period is a completed trading session. The conventional settings are 12, 26 and 9.
At session 60, the 12-session EMA is about $71.878 and the 26-session EMA is $70.073. MACD is $71.878 − $70.073 = $1.805.
The other two parts start with MACD:
- The signal line is a nine-period EMA of MACD. Its inputs are MACD values, not stock closes.
- The histogram is MACD − signal, drawn as bars extending from zero. Positive bars mean MACD is above its signal; negative bars mean it is below.
All three outputs here are dollars per share, not percentages.
Read the same chart two ways
Harbor closes at $66 for 40 sessions, rises $0.40 per session for 20 sessions, then alternates between $75 and $73 for 60 sessions. Two stops along that path show how the readings separate. Values are rounded to three decimals.
| Session | MACD | Signal | Histogram |
|---|---|---|---|
| 60 | 1.805 | 1.467 | 0.338 |
| 70 | 1.373 | 1.584 | −0.211 |
At session 60, MACD is above both zero and its signal. The histogram is positive too: 1.805 − 1.467 = 0.338.
Ten sessions later, MACD is still positive: the shorter price average remains above the longer one. But 1.373 − 1.584 = −0.211. The gap between the price averages is now below its own recent average.
The shorter average can stay ahead while its lead weakens.
The panels share the same sessions. At the session-70 guide, the solid MACD line sits above zero but below the dashed signal line.
Know which line was crossed
A crossing only makes sense if you know which two lines met.
- A MACD zero-line crossing means the two price EMAs switch order. Above zero, the shorter EMA is higher; below zero, it is lower.
- A MACD signal-line crossing means MACD switches sides of its signal average. The histogram crosses zero at the same time, because it is their difference.
Reverse the opening puzzle: if MACD is −1 and signal is −2, the histogram is −1 − (−2) = +1. The shorter price average is still below the longer one, even though MACD sits above its signal. A positive histogram does not require positive MACD.
Read the sign and the change
A shrinking positive histogram means MACD's lead over its signal is narrowing. It does not require the stock price to fall. From sessions 55 to 60, Harbor's close rises from $72 to $74 while its histogram shrinks from 0.387 to 0.338. The bars get shorter while the stock keeps climbing.
MACD has no fixed upper or lower bound. A reading of 2 is not universally high, and −2 is not universally low. Double every price in a history and MACD doubles too, with exactly the same percentage moves. Dollar gaps cannot fairly rank momentum across differently priced stocks.
Comparisons need matching chart settings, including the interval and price source. Twelve periods on a daily chart means twelve trading sessions; on a weekly chart, it means twelve weeks.
When sideways prices confuse MACD
Near the end, Harbor still alternates between $75 and $73. As the old climb fades from the averages, those back-and-forth moves push MACD repeatedly across its signal. In the last six sessions, the histogram flips sign five times.
At session 119 the histogram is +0.021; at 120 it is −0.058. These bars measure indicator gaps, not gains or losses. The apparent signal reverses while the price stays in the same two-dollar range.
This is the whipsaw problem applied to MACD. Treat every crossing as a trading instruction and a sideways market can keep you busy going nowhere. A crossing alone tells you nothing about a rule's profitability; chart patterns explains how those claims are tested.
Adding a moving-average overlay reuses the same prices. Agreement between the two is not independent confirmation: it can be one input speaking twice.
Your session-70 research note can say: “The shorter EMA is above the longer one, but their difference is below its own recent average.” That describes the chart without turning a negative bar into a forecast.
For a different question about price history, the next optional lesson uses Bollinger Bands to show how widely closes spread around their average.
In short
- MACD subtracts the slower price EMA from the faster one.
- The signal smooths MACD; the histogram measures their difference.
- A positive MACD and a negative histogram can both be correct.
- Sideways prices can repeatedly reverse the apparent signal.
