MACD Explained: Line, Signal Line and Histogram
MACD tracks the relationship between a fast and a slow EMA to show shifts in trend momentum, using a MACD line, a signal line, and a histogram.
- MACD is built from two EMAs, usually 12 and 26 periods — the MACD line is simply the difference between them.
- The signal line is a 9-period EMA of the MACD line itself, and crossovers between the two are the most commonly watched MACD signal.
- The histogram is the gap between the MACD line and the signal line — shrinking bars often warn of a crossover before it actually happens.
- MACD is a lagging, trend-following tool by construction, since it’s built entirely from moving averages of past price.
MACD, short for Moving Average Convergence Divergence, is really just two EMAs and their relationship to each other, repackaged into a cleaner visual. Once you see the three pieces, the MACD line, the signal line, and the histogram, as three views of the same underlying relationship, the indicator stops feeling like a black box.
How MACD Is Built
MACD line = 12-period EMA − 26-period EMA
Signal line = 9-period EMA of the MACD line
Histogram = MACD line − signal line
When the fast 12 EMA is above the slow 26 EMA, the MACD line is positive, meaning short-term momentum is running ahead of the longer-term trend. When the fast EMA falls below the slow one, the MACD line goes negative, the reverse case.
Reading Crossovers
The most commonly watched MACD signal is a crossover between the MACD line and its own signal line. When the MACD line crosses above the signal line, it’s read as bullish momentum building. When it crosses below, it’s read as bearish momentum building.
Crossovers happen often, especially in sideways, choppy markets, where the two lines can cross back and forth repeatedly with no real trend behind either move. Treating every single crossover as a trade signal is one of the fastest ways to overtrade MACD.
MACD line crossing above the signal line
Reading the Histogram
The histogram is the distance between the MACD line and the signal line, plotted as bars. Growing bars mean that gap is widening, momentum accelerating in the current direction. Shrinking bars mean the gap is narrowing, momentum fading, which frequently shows up before the lines actually cross — making the histogram a slightly earlier read than waiting for the crossover itself.
Zero-Line Crossovers
Separate from the MACD/signal crossover, watch what happens when the MACD line itself crosses the zero line. A move from negative to positive means the fast EMA has crossed above the slow EMA (the two moving averages that built MACD in the first place), which is a longer-term, higher-conviction trend signal than a signal-line crossover, since it reflects an actual shift in the underlying moving averages, not just MACD’s own smoothed version of itself.
MACD Divergence
Just like RSI, MACD can diverge from price: if price makes a new high but the MACD line makes a lower high, the rally is running on fading momentum even though price is still climbing. That combination is often treated as an early warning that a trend is losing steam before the price chart shows any obvious sign of it.
Key takeaways
- MACD is a repackaged view of two EMAs — understanding the 12/26/9 construction explains why it behaves the way it does.
- The histogram often leads the crossover, since a shrinking gap between the two lines shows up visually before they actually cross.
- A zero-line crossover is a stronger, slower trend signal than a signal-line crossover, since it reflects the actual EMAs flipping, not MACD’s smoothed version of itself.
- MACD confirms momentum that’s already building; it does not predict a move before it starts.
Common mistakes
- Trading every signal-line crossover in a sideways market, where MACD whipsaws constantly with no real trend behind it.
- Treating MACD as a leading indicator rather than a lagging, trend-confirming one.
- Watching the lines cross but ignoring the histogram, which often gives the same read a few candles earlier.
Frequently asked questions
What are the best MACD settings?
12, 26, 9 is the original and still the most widely used combination, largely because so much of the market is watching those same numbers. Faster combinations (like 5, 13, 6) react quicker on lower timeframes at the cost of more noise.
Does MACD work well on lower timeframes?
It works the same mathematically on any timeframe, but on very low timeframes (1-minute, 5-minute charts) it tends to generate a lot of crossovers that don’t lead anywhere, simply because short-term price is noisier relative to the moving averages behind it.
MACD vs. RSI — which is better?
They answer different questions rather than competing directly: RSI measures how stretched recent momentum is on a fixed 0–100 scale, while MACD measures the relationship between two trend-following moving averages. Many traders use both together, since they can confirm each other rather than duplicate the same signal.
Want to see this on a live chart?
The Tradeskill's charts have every indicator on this page built in, free, with $20,000 in virtual cash to practice with.
Disclaimer: this article is educational content, not financial advice. Markets involve risk, and past behavior does not guarantee future results.
← Browse the full Trading GlossaryRelated Terms
RSI Explained: How the Relative Strength Index Works
RSI is a 0–100 momentum oscillator built from the size of recent gains versus recent losses, used to flag when a move may be overextended.
EMA Explained: EMA 9, 15, 20, 50 and 200
The exponential moving average (EMA) weights recent candles more heavily than older ones, which makes it react to new price action faster than a simple moving average.
Bollinger Bands Explained: Squeeze and Breakout
Bollinger Bands plot a moving average with two bands set a number of standard deviations away, so the bands automatically widen and narrow with volatility.