MACD explained: crossovers, the histogram and divergence
What MACD measures, how to read the signal line, histogram and zero line, why it lags and whipsaws in ranges, and how to use it as a filter.
Key takeaways
- MACD is the gap between a 12-period and a 26-period EMA, with a 9-period EMA of that gap as the signal line and the difference between the two drawn as a histogram.
- Above zero means the faster average is above the slower one, and a shrinking histogram shows momentum fading before any crossover happens.
- MACD is built from moving averages, so it lags and whipsaws in ranges; use it to judge trend and momentum, and take entries and stops from price levels.
In this article
MACD (moving average convergence divergence) shows the gap between a fast and a slow moving average of price, so it tells you whether short-term momentum is pulling ahead of the longer trend or falling back toward it. Read it as a trend and momentum filter: above zero and rising favours longs, below zero and falling favours shorts, and the actual entry still comes from price at a level.
This guide covers how MACD is calculated, how to read its three parts, and why it lags. It builds directly on moving averages explained, so if EMAs are new to you, read that first.
What is MACD?
MACD is an indicator drawn in a separate panel under the price chart. It was developed by Gerald Appel in the late 1970s. The standard settings are 12, 26 and 9, and this site always uses them. As with any indicator, the periods are candles of whatever timeframe you are on: 26 hours on a 1-hour chart, 26 days on a daily chart.
MACD has three parts:
- The MACD line = 12 EMA − 26 EMA of the closing price. It is positive when the faster average is above the slower one and negative when it is below.
- The signal line = a 9-period EMA of the MACD line. It is a smoothed, slower copy of the MACD line.
- The histogram = MACD line − signal line, drawn as bars above or below a zero line. Platforms often colour the bars green when positive and red when negative.
Worked example. On a 4-hour ETH chart, the 12 EMA is $3,050 and the 26 EMA is $3,020.
The MACD line is $3,050 − $3,020 = +30. The faster average is above the slower one, so short-term momentum is
up.
The signal line, the 9 EMA of recent MACD values, is 36. The histogram is 30 − 36 = −6. So MACD is still
positive, but it has dropped below its own recent average. Momentum is up, but it is weaker than it was a few candles ago.
MACD is measured in price units, not on a fixed scale like RSI, so its values grow as price grows. Compare it with its own recent history on the same chart, not with fixed numbers or other coins.
What does the MACD zero line mean?
The zero line is where the 12 EMA and the 26 EMA are equal. When MACD crosses above zero, the 12 EMA has just crossed above the 26 EMA. When it crosses below zero, the 12 EMA has crossed below. A zero-line cross is simply a moving average crossover shown in a different way.
That makes the zero line the slowest part of MACD. Many traders only take long setups while MACD is above zero and short setups while it is below, which is a reasonable way to avoid fighting the trend on the chart you trade.
Because it involves the 26 EMA, a zero-line cross happens well after the turn in price. In the chart above, price has already climbed some way off its low by the time MACD crosses zero. That is the cost of confirmation.
What is a MACD crossover?
A bullish crossover is when the MACD line crosses above the signal line. A bearish crossover is when it crosses below. At that moment the histogram flips sign, from red to green on a bullish crossover and from green to red on a bearish one.
A signal-line crossover reacts faster than a zero-line cross. In the chart above, the sequence is typical of a turn from a downtrend:
- Price makes its low while MACD is well below zero.
- The selling slows, MACD starts rising, and it crosses above the signal line. The histogram flips from red to green.
- Price keeps climbing, and later MACD crosses above the zero line, confirming that the 12 EMA is now above the 26 EMA.
Where the crossover happens matters
A bullish crossover far below zero says a downtrend is losing speed, not that an uptrend has started. It can be the first step of a turn, or just a pause before the next leg down. A bullish crossover above zero, after a pullback within an uptrend, says momentum is picking up again in the direction of the existing trend. The second is usually the cleaner reading, because the trend and the momentum agree.
What does the MACD histogram show?
The histogram measures how far the MACD line is from its signal line, so it shows whether momentum is speeding up or slowing down. When the bars grow taller, the gap is widening and the move is accelerating. When they shrink toward zero, the gap is closing and the move is losing speed.
The histogram changes before the crossover does, because a crossover is just the moment the bars reach zero. Watch them shrink for several candles and the crossover rarely comes as a surprise.
Shrinking bars do not mean price is about to reverse, only that the move is slowing. A shrinking histogram during a rally into resistance is a reason to tighten your plan or skip a new long; it is not a reason on its own to go short.
What is MACD divergence?
Divergence works the same way as on RSI. Bullish divergence is when price makes a lower low but MACD (or the histogram) makes a higher low. Bearish divergence is a higher high in price with a lower high in MACD. In both cases the latest push in price came with less momentum than the one before.
Divergence is a warning, not an entry, and it can repeat several times in a strong trend. Treat it as you would RSI divergence: wait for price to confirm, for example with a candle that closes above the previous candle's high, and put the stop under the low that formed the divergence.
Divergence matters most near a level, such as support or resistance. A mismatch in the middle of nowhere tells you little.
Why does MACD lag and whipsaw?
Lag
Every part of MACD is a moving average, and the signal line is an average of a difference of averages. Each layer of smoothing adds delay. By the time a zero-line cross confirms a new trend, much of the move can already be over. Better settings cannot fix that: less lag means more noise, and more smoothing means more lag.
Whipsaws in ranges
When price moves sideways, the 12 EMA and the 26 EMA sit close together and keep crossing. MACD hovers around zero, and the MACD line and signal line cross back and forth every few candles. Most of those crossovers lead nowhere, and trading each one means paying fees and small losses again and again.
A practical clue is a flat MACD tangled with its signal line near zero. That usually means there is no trend to filter, and a range approach such as range trading, which works off the edges of the range, fits the market better than MACD crossovers do.
How should you use MACD in crypto trading?
Like RSI, MACD is better as a filter ("is this the right market for this setup?") than as a trigger ("when exactly do I enter?"), which it answers late.
A simple way to combine them:
- Check the bigger trend. On this site, the higher timeframe counts as trending up when its close is above the 20 EMA and the 20 EMA is above the 50 EMA.
- Use MACD as the momentum filter on your trading chart. For longs, MACD should be above zero, showing the trend is present on the timeframe you trade.
- Wait for a pullback to a price level. Support, a former resistance level, or the 20 EMA. The histogram will usually shrink or turn red during the pullback, which is normal.
- Take the entry from price. A candle that closes above the previous candle's high at the level. A bullish MACD crossover around the same time is supporting evidence, not a requirement.
- Put the stop past the structure, not at a MACD reading, and size the position from the stop.
Worked example. The daily ETH chart is trending up. On the 4-hour chart MACD is above zero.
Price pulls back to a former resistance level at $3,000, with a swing low at $2,980, while the histogram shrinks and turns
slightly red. A candle then closes at $3,060, above the previous candle's high, and the histogram turns green again.
The ATR is $50, so the stop goes at $2,980 − 0.2 × $50 = $2,970. Risk per coin is $3,060 − $2,970 = $90. On a $10,000 account
risking 1% ($100), the position is $100 ÷ $90 = 1.11 ETH, about $3,400 of exposure. The recent high is $3,240, which is $180
above the entry: 2R, enough to clear the 1.5R minimum.
MACD did not set the entry, the stop or the target. It only confirmed that momentum was on the side of the trade. The trend pullback and trend following pages show complete rule sets built on the same idea. For the stop itself, see stop-loss placement.
What MACD is good at
- Showing which side of the trend you are on at a glance.
- Showing momentum fading through a shrinking histogram.
- Confirming that a turn has follow-through, via the zero line.
- Working the same way on any coin and timeframe.
What MACD is bad at
- Catching the start of a move; it always arrives late.
- Sideways markets, where crossovers come thick and fast.
- Comparing coins, since its values are in price units.
- Giving entries, stops or targets on its own.
Common mistakes
- Trading every crossover. In a range the MACD line and signal line cross constantly, and each trade pays fees and a small loss.
- Reading a crossover below zero as a new uptrend. It shows a downtrend slowing, which can just as easily be a pause before the next leg down.
- Expecting MACD to call tops and bottoms. It is built from moving averages, so it confirms turns after they happen, never before.
- Treating divergence as an entry. Divergence can repeat several times in a strong trend, so act only after price confirms with a close.
- Comparing MACD values across coins or years. The values are in price units, so the same number means different things at different prices.
- Tuning the settings to fit past charts. Changing 12, 26 and 9 until old signals look perfect explains history and predicts nothing.
What to check
- Is the bigger timeframe trending? Check whether the close is above the 20 EMA and the 20 EMA is above the 50 EMA. If not, MACD signals on your chart are more likely to whipsaw.
- Which side of zero is MACD on? Above zero favours longs, below zero favours shorts. A trade against that side needs a stronger reason.
- Is the MACD line tangled with the signal line near zero? That usually means a range. Crossovers there are mostly noise.
- What is the histogram doing? Growing bars mean the move is speeding up. Shrinking bars mean it is slowing, which matters most when price is at a level.
- Is price at a level? MACD is supporting evidence. The entry, stop and target should come from support, resistance or swing points on the price chart.
- Where is the stop, and is the target far enough? Put the stop past the swing low plus 0.2 ATR, size from it at 1% risk, and check the first target is at least 1.5R away. See how much to risk per trade.
- Did you test it on this coin? Run the exact rules on the coin's own history with fees of 0.1% each way before trusting them. None of these rules is known to make money.
MACD describes recent price; it does not forecast it. Crypto is volatile, leverage can wipe out an account, and nothing on this site is financial advice. For definitions of the terms above, see the glossary, and for how MACD fits alongside other tools, read what to check before any trade.
Further reading
- MACD Wikipedia
- Moving average Wikipedia
- Momentum (technical analysis) Wikipedia