What is MACD (moving average convergence divergence)?
MACD (moving average convergence divergence) tracks the gap between a fast and a slow EMA of price, plus a signal line that smooths that gap.
Ours uses 12, 26 and 9 by default and reads the close unless you pick another source. The pane shows three plots: DIF (the MACD line), DEA (the signal line) and a histogram. Note that our histogram is twice the difference between DIF and DEA, so its bars are taller than in charts that plot the plain difference; zero crossings and turning points are the same. All EMAs are seeded with a simple average.
How is MACD calculated?
DIF = EMA(12) − EMA(26), DEA = EMA(DIF, 9), Histogram = 2 × (DIF − DEA)
The terms in the formula
- EMA(n)
- Exponential moving average of the source over n bars, k = 2 / (n + 1).
- DIF
- The MACD line: fast EMA minus slow EMA, in price units.
- DEA
- The signal line: 9-bar EMA of DIF.
- Histogram
- Twice the gap between DIF and DEA.
How do you read MACD?
- DIF above zero means the fast EMA is above the slow one, commonly read as upward momentum; below zero the opposite.
- DIF crossing above DEA (histogram turning positive) shows momentum improving; crossing below shows it fading.
- A shrinking histogram warns that the current push is slowing before the lines actually cross.
- Divergence between price and DIF, such as a new price low with a higher DIF low, suggests the selling pressure is easing.
What are the limits of MACD?
- It is built from moving averages of moving averages, so every signal lags price.
- Values are in price units, so a 2 reading means very different things on a $20 and a $2,000 stock; compare a stock only with itself.
- In sideways markets the lines cross often and the crosses mean little.
- Our doubled histogram is not directly comparable with values quoted elsewhere.
Where can you see it on TickerBase?
Open a live chart and add the indicator