MACD indicator explained: lines, histogram and signals
How the MACD is calculated from two EMAs, what the MACD line, signal line and histogram show, and how to use crossovers, the zero line and divergence sensibly.
What MACD measures
The Moving Average Convergence Divergence (MACD), created by Gerald Appel, measures momentum by comparing a fast and a slow exponential moving average. When the fast average pulls away from the slow one, momentum is growing; when they come together, it is fading.
The three parts
- MACD line = 12-period EMA − 26-period EMA of the close.
- Signal line = 9-period EMA of the MACD line.
- Histogram = MACD line − signal line, drawn as bars around zero.
The settings 12, 26 and 9 are the standard; they work on any timeframe because they count candles, not days. (New to EMAs? See moving averages explained.)
Reading it
Signal-line crossovers
When the MACD line crosses above the signal line (the histogram turns positive), short-term momentum has turned up; a cross below means it turned down. These signals come often and are best taken in the direction of the bigger trend.
The zero line
MACD above zero means the 12 EMA is above the 26 EMA - the trend is up on that timeframe; below zero, it is down. A cross of the zero line is a slower, more significant change than a signal-line cross.
The histogram
Shrinking bars show momentum fading before the lines actually cross - an early warning. Growing bars show momentum building.
Divergence
Price makes a higher high while MACD makes a lower high (bearish divergence), or price makes a lower low while MACD makes a higher low (bullish divergence). As with RSI divergence, treat it as a warning to tighten your plan, not as a reason to fight the trend on its own.
Strengths and weaknesses
MACD is good at showing trend direction and the change of momentum within a trend. It is weak in sideways markets, where the lines cross back and forth and produce a series of small losing signals, and it always lags because it is built from moving averages.
A simple filter: only take signal-line crossovers in the direction of the zero line - buys when MACD is above zero, sells when it is below. It cuts many of the signals that fail in ranges.
MACD on TradeMuv
Add MACD from the Indicators menu; it opens in its own pane with adjustable lengths, source and colours. You can show it only on the timeframes you choose. Want a variation? MACD is one of the easiest indicators to rebuild in Pine Script with ta.macd().
One account. Every screen.
TradeMuv is the free trading chart platform: live charts, footprint and order flow, bar replay, paper trading, Pine Script, unlimited indicators and alerts - on your computer, tablet and phone, with one free account.
Explore all TradeMuv featuresFree · no card · no downloadEverything in this guide works in TradeMuv, free - no card, no trial.
Create free accountThis guide is for education only and is not financial advice. Trading involves risk. Risk disclaimer.
Keep learning
How Bollinger Bands are built, what band width tells you about volatility, how to read the squeeze, band walks and mean reversion, and the settings traders use.
6 min readIndicatorsSupertrend indicator: settings, signals and limitsHow the Supertrend indicator works with ATR, what the 10 and 3 settings mean, how traders use it for trend direction and trailing stops, and where it fails.
6 min readChart typesHeikin Ashi charts: smoother trends, explainedHow Heikin Ashi candles are calculated, why they make trends easier to see, how to read them, and the important difference from real prices.
5 min read