MACD Explained: The Lines, the Histogram, the Settings, and What Our Test Found
MACD, short for Moving Average Convergence Divergence, is one of the most widely used indicators on any chart, and one of the most misread. It is not a separate source of information. It is two moving averages of price, rearranged so that the relationship between them is easier to see. Once you know exactly what it is built from, you also know what it can and cannot tell you.
This article covers the mechanics. Divergences, where MACD and price disagree, have their own guide: [MACD divergence strategy](/guides/macd-divergence).
How MACD is calculated
With the standard 12, 26, 9 settings:
- MACD line = 12-period EMA of the close − 26-period EMA of the close
- Signal line = 9-period EMA of the MACD line
- Histogram = MACD line − signal line
EMA means exponential moving average: an average that gives more weight to recent closes. Everything in MACD comes from closing prices. There is no volume, no high or low, nothing that is not already on the price chart.
A worked example
Bitcoin on the daily chart:
| | Value |
|---|---|
| 12-day EMA | 63,400 |
| 26-day EMA | 62,500 |
| MACD line | 900 |
| Signal line (9-day EMA of MACD) | 700 |
| Histogram | 200 |
Read it in three steps:
- MACD line above zero (900): the short average is above the long one, so recent prices are higher than older ones. That is a trend reading.
- MACD above the signal line: the gap between the two averages is wider than its own recent average. The trend is strengthening.
- Histogram positive (200): how far the MACD line is above its signal. If it was 350 yesterday and 200 today, the trend is still up but the strengthening has slowed.
What each part actually tells you
The zero line. MACD crosses zero exactly when the 12 and 26 EMAs cross. A zero-line cross is a moving average crossover, nothing more, and it carries all the lag of a 26-period average.
The signal-line cross. When MACD crosses its signal line, the momentum of the trend has changed direction. It comes earlier than a zero cross and is wrong more often for the same reason: it reacts to smaller changes.
The histogram. The histogram measures the change in momentum. It peaks before the MACD line does, and the MACD line in turn peaks before price usually does. That is why the histogram is popular for timing: it is the first part of the indicator to turn. It is also the noisiest part. A histogram that shrinks for two bars on a 1-hour chart says very little.
Why MACD values cannot be compared across assets
MACD is measured in price units. A MACD of 900 on Bitcoin and 0.0009 on EUR/USD can describe exactly the same strength of trend. Even on one asset, a MACD of 900 at a price of 30,000 is a much stronger reading than 900 at 90,000. So never set fixed thresholds like "buy when MACD is above 500". If you need a comparable number, the percentage price oscillator (PPO) is the same calculation divided by the long average, which makes it a percentage.
Should you change 12/26/9?
The standard settings are not optimised for any market. They are a convention, and that is their main value: most traders see the same thing. Common alternatives include faster settings like 8/17/9 for shorter swings and slower ones like 5/35/5 for a smoother line.
Shorter settings make MACD react earlier and give more signals, more of them false. Longer settings react later and give fewer, cleaner signals. Neither is better in general. If you test alternatives, test them on data you did not look at while choosing them, otherwise the "best" settings are just the ones that happened to fit the past. That trap is described in [backtesting honestly](/learn/technical/backtesting-honestly).
What our own test found
We tested 102 textbook conditions on the 20 largest crypto assets, on daily, weekly and 4-hour charts, with doubled trading costs. The question was narrow: when a trend-following entry happens, does a given condition being true change how that entry turns out? Four MACD conditions were included:
- MACD line above its signal line
- MACD line above zero
- Histogram rising
- MACD crossing above its signal line within the last three bars
None of them passed. After correcting for the number of conditions tested (306 in total across the three timeframes), none of the four MACD conditions showed a reliable difference on any timeframe. Six conditions out of 306 did, and none of them was MACD-based.
Why? Probably because MACD is built from moving averages of price, and a trend-following entry already uses moving averages of price. Adding MACD on top mostly confirms what the entry already knew. That is the general problem of [indicator overload](/learn/technical/indicator-overload): more lines built from the same closes do not add more information.
This does not mean MACD is useless. It is a clear way to see trend and momentum on one panel, and divergences are a separate question. It means that "MACD agrees" is not an edge for an entry that already follows the trend.
A practical way to use MACD
- For context, not as a trigger. Is MACD above zero on a higher timeframe? That tells you which direction the larger trend favours.
- For momentum fading. A shrinking histogram in a strong trend is a reason to stop adding to the position, not necessarily a reason to exit it.
- Together with a non-price tool. Volume or volatility measures add information MACD does not have.
- With a stop that does not depend on MACD. Exits based on MACD crosses tend to be late in fast markets. Your stop should be based on price and volatility, as covered in [where to put a stop](/learn/risk/where-to-put-a-stop).
Frequently asked questions
What are the best MACD settings? There are no universally best settings. 12/26/9 is the standard and the most widely watched. Faster settings give earlier and noisier signals, slower ones later and cleaner signals. Pick one, keep it consistent, and judge it on data you did not use to choose it.
What does the MACD histogram show? The distance between the MACD line and its signal line. Rising bars mean the trend's momentum is increasing; shrinking bars mean it is slowing. It turns before the MACD line and before price, which makes it early but noisy.
Is a MACD crossover a buy signal? A signal-line cross shows a change in momentum, and a zero-line cross is a moving average crossover. Neither is reliable on its own, and in our test of trend entries on large-cap crypto, MACD crosses added no measurable benefit.
What is the difference between MACD and RSI? MACD is unbounded and measures the gap between two moving averages. RSI is bounded between 0 and 100 and measures the ratio of recent gains to losses. Both are built only from closing prices, so they often say similar things. The [RSI trading guide](/guides/rsi-trading) covers RSI in detail.
Indikora is an AI-powered trading coach for crypto, forex, gold and indices. Its analysis explains which indicators agree, which disagree and why, instead of turning one crossover into a signal. Try it free: https://indikora.com
This article is for educational purposes only and is not financial advice.
