The MACD indicator, short for Moving Average Convergence Divergence, is the difference between a 12-period and a 26-period exponential moving average (EMA) of the price. A 9-period EMA of that difference, called the signal line, and a histogram of the gap between the two complete the indicator. Gerald Appel developed it in the late 1970s. MACD shows the direction of short-term momentum against the longer trend and when that momentum changes. Because it is built from moving averages, it always reacts after the price has moved.
This article is educational and is not financial advice.
What is the MACD indicator?
MACD has three parts, usually drawn in a panel below the price chart.
- MACD line: the 12-period EMA minus the 26-period EMA. Above zero, the short average is above the long one.
- Signal line: a 9-period EMA of the MACD line. It is a smoother, slower copy.
- Histogram: the MACD line minus the signal line, drawn as bars. It shows how far apart the two lines are.
The zero line is the fourth reference. When MACD crosses zero, the 12-period EMA has crossed the 26-period EMA.
The name describes what the two averages do. When they move apart, they diverge and MACD grows. When they move closer, they converge and MACD shrinks toward zero.
The MACD formula (12, 26, 9)
MACD uses exponential moving averages, which give more weight to recent closes than a simple average does.
EMA today = EMA yesterday + k × (close today − EMA yesterday) k = 2 / (n + 1) 12-period EMA: k = 2 / 13 ≈ 0.154 26-period EMA: k = 2 / 27 ≈ 0.074 9-period EMA: k = 2 / 10 = 0.2 MACD line = EMA(12) − EMA(26) signal line = EMA(9) of the MACD line histogram = MACD line − signal line
Each new close pulls the 12-period EMA about 15% of the way toward it, and the 26-period EMA about 7% of the way. That difference in speed is what MACD measures.
A worked example on Bitcoin
All numbers below are examples. They are not a forecast and not current data.
Assume yesterday's values on a daily Bitcoin chart were:
- 12-period EMA: $101,000
- 26-period EMA: $100,000
- MACD line: 1,000
- Signal line: 800
- Histogram: +200
Day 1. Bitcoin closes at $99,000.
- 12-period EMA = 101,000 + 0.154 × (99,000 − 101,000) = $100,692
- 26-period EMA = 100,000 + 0.074 × (99,000 − 100,000) = $99,926
- MACD line = 100,692 − 99,926 = 766
- Signal line = 800 + 0.2 × (766 − 800) = 793
- Histogram = 766 − 793 = −27
The histogram turned negative, so the MACD line crossed below the signal line. That is a bearish MACD crossover.
Day 2. Bitcoin closes at $97,000.
- 12-period EMA = $100,124
- 26-period EMA = $99,709
- MACD line = 415
- Signal line = 718
- Histogram = −303
Notice what MACD did not do. The price closed below both averages on both days, yet the MACD line is still above zero. The averages carry the memory of earlier, higher prices. That is the lag built into every moving-average indicator.
How to read MACD: crossovers, zero line and histogram
MACD gives three kinds of readings. Each is a description of momentum, not an instruction.
The MACD crossover
A MACD crossover happens when the MACD line crosses the signal line. Crossing above is called bullish; crossing below is called bearish. These are the fastest and also the noisiest MACD readings. StockCharts advises caution with crossovers that happen far above or far below zero, where the move is already stretched.
The zero-line crossover
When MACD crosses zero, the 12-period EMA has crossed the 26-period EMA. This is slower and fewer in number than signal-line crossovers. It is the same idea as a moving-average crossover such as the golden cross, only shorter and with exponential averages. See golden cross and death cross for the 50- and 200-day version.
The MACD histogram
The MACD histogram shows the gap between the MACD line and the signal line. It turns from positive to negative exactly at a bearish crossover, and the other way round at a bullish one. Bars that shrink while still positive show that upward momentum is slowing before any crossover happens. That is why many traders watch the histogram rather than the lines.
MACD divergence
MACD divergence means the price and MACD disagree.
- Bearish divergence: the price makes a higher high, but MACD makes a lower high.
- Bullish divergence: the price makes a lower low, but MACD makes a higher low.
Both show momentum fading behind the price move. Neither shows that a turn has started. StockCharts notes that bearish divergences are common in strong uptrends, where they can appear several times before any real top. There is no reliable figure for how often divergence leads to a reversal; results depend on the market, the timeframe and the period studied.
Why MACD lags
MACD lags because it is built from moving averages, and the signal line is an average of an average. Every value contains older prices. In a trending market this is a feature: the indicator ignores small wiggles and keeps you looking at the trend. In a sideways market it is a weakness. The lines cross back and forth, often after each small move has already reversed. That pattern of false crossovers is called a whipsaw.
The worked example shows the lag in numbers. After two lower closes, MACD was still positive. The trend had already changed on the price chart before the zero line said so.
MACD vs RSI
MACD and RSI are both momentum indicators, but they are built and read differently. The table compares them side by side.
| MACD | RSI | |
|---|---|---|
| Developed by | Gerald Appel, late 1970s | J. Welles Wilder Jr., 1978 |
| Built from | Gap between 12- and 26-period EMAs | Smoothed average gains vs average losses |
| Default settings | 12, 26, 9 | 14 |
| Scale | No upper or lower limit, in price units | Always 0 to 100 |
| Key levels | Zero line and signal line | 70, 30 and 50 |
| Best at showing | Trend direction and changes in momentum | How stretched recent momentum is |
| Weak spot | Lags; whipsaws in sideways markets | Stays at 70 or 30 in strong trends |
| Compare across coins? | No, values depend on the price | Yes, the scale is fixed |
| Overbought and oversold | Not suited, because it has no limits | Its traditional use |
They often agree, because both are calculated from the same closing prices. Using them together adds less independent evidence than two separate indicators suggest. For the details of RSI, see the RSI indicator guide.
MACD settings and crypto
The standard MACD settings are 12, 26 and 9. They date from a time when markets traded six days a week, so they roughly matched two weeks, one month and a week and a half. Many traders keep them because so many others use them.
Crypto changes the meaning of those numbers:
- Every day has a candle. On a daily crypto chart, 12 candles are 12 calendar days, about 1.7 weeks, and 26 candles are about 3.7 weeks.
- Short charts cover very little time. On a 4-hour chart, 26 candles are about 4.3 days. On a 1-hour chart they are about a day.
- MACD is in price units. A MACD of 766 on Bitcoin and a MACD of 25 on Ether say nothing about which has stronger momentum. Bitcoin's price is simply larger. To compare coins, divide by the long average: (EMA 12 − EMA 26) / EMA 26 × 100. This version is called the Percentage Price Oscillator (PPO). In the example above, 766 / 99,926 × 100 ≈ 0.77%.
Some traders use faster settings for short-term crypto charts. Faster settings react sooner and produce more crossovers, false ones included. Changing the numbers until the past looks perfect fits the indicator to history, and that fit rarely carries forward.
How to use it in CryptoPith
- Open AI chart analysis to see the candles with the 20- and 50-period EMAs and numbered notes. Each note gives its basis and its uncertainty.
- Open an AI market analyst report. The indicator table shows MACD (12, 26, 9) with the MACD line, the signal line and a short note on the histogram, for example that it has fallen for several candles.
- Read the signal agreement count. It says how many indicators lean up or down. It is a count, not a probability, and MACD and RSI often lean the same way.
- Use the Evidence trail to see the numbers, the formula and the candles behind a MACD reading.
- To compare momentum across many coins on one fixed scale, use the Crypto RSI heatmap.
Indicators in CryptoPith are calculated in code from checked candles, and the AI only explains them. AI chart analysis is part of Pro ($14 a month) and the higher plans. Your first AI report is free. CryptoPith does not trade, gives no buy or sell signals and does not connect to wallets or exchanges.
Common mistakes and limits
- Acting on every crossover. In sideways markets crossovers come and go with little follow-through.
- Expecting MACD to call the turn. It confirms a change after the price has moved. It is not early by design.
- Reading MACD as overbought or oversold. It has no upper or lower limit, so a "high" value is only high compared with its own past.
- Comparing raw MACD values between coins. Use the percentage version or a bounded indicator.
- Counting MACD and RSI as two independent votes. They come from the same closes.
- Ignoring the timeframe. A 1-hour crossover and a daily crossover describe very different moves.
FAQ
What is the MACD indicator in simple terms?
It is the gap between a fast and a slow moving average of the price. When the gap grows, short-term momentum is pulling away from the longer trend. When it shrinks, momentum is fading.
What is a MACD crossover?
It is the moment the MACD line crosses its signal line. Crossing above is called bullish, crossing below bearish. The histogram changes sign at the same moment.
What does the MACD histogram show?
It shows the distance between the MACD line and the signal line. Growing bars mean momentum is building in that direction. Shrinking bars mean it is slowing, often before a crossover.
What are the best MACD settings for crypto?
There are no best settings. 12, 26 and 9 are the standard and make readings comparable with other charts. Faster settings react sooner but give more false crossovers.
Is MACD a leading or a lagging indicator?
It is a lagging indicator. It is calculated from moving averages of past closes, so it confirms a move rather than predicting it.
Which is better, MACD or RSI?
Neither is better. MACD is stronger at showing trend direction and changes in momentum. RSI is stronger at showing how stretched momentum is on a fixed scale.
Sources
- MACD (Moving Average Convergence/Divergence Oscillator), StockCharts ChartSchool: Gerald Appel, the calculation, crossovers, divergences, the lack of limits and why values cannot be compared across securities.
- MACD, Wikipedia: origin in the late 1970s, the 12, 26, 9 settings and the six-day week, and MACD as a lagging indicator.
Related tools: AI chart analysis, AI market analyst and Crypto RSI heatmap. Your first AI report in CryptoPith is free.
