What is MACD?
Reviewed by Karthikeyan Anbarasan (Founder, TradeLyser) · Updated 19 Oct 2026 · Editorial policy
How MACD is calculated
Each EMA uses a smoothing factor of 2 ÷ (n + 1): about 0.154 for 12 periods, 0.074 for 26 and 0.2 for the 9-period signal. When the fast EMA pulls away from the slow one, the MACD line moves away from zero; when they converge, it moves back towards zero. The histogram shows whether that gap is widening or narrowing, which is why it turns before the MACD line crosses its signal.
12, 26 and 9 are Gerald Appel’s original settings and the default almost everywhere. Some traders shorten them for intraday charts, but the defaults are what most published examples assume. MACD is measured in price points, so a reading of +60 on Nifty and +250 on Bank Nifty say nothing about which is stronger. The percentage price oscillator, (EMA12 − EMA26) ÷ EMA26 × 100, puts both on the same scale: 60 ÷ 25,080 is about 0.24%.
Worked example: momentum fading under a rising price
| Day | Nifty close | MACD | Signal | Histogram |
|---|---|---|---|---|
| 1 | 25,050 | 72.0 | 50.0 | +22.0 |
| 2 | 25,110 | 76.0 | 55.2 | +20.8 |
| 3 | 25,160 | 74.0 | 59.0 | +15.0 |
| 4 | 25,190 | 69.0 | 61.0 | +8.0 |
| 5 | 25,210 | 63.0 | 61.4 | +1.6 |
| 6 | 25,180 | 58.0 | 60.7 | −2.7 |
Illustrative. Each signal value is the previous signal plus 0.2 × (MACD − previous signal); for day 2, 50 + 0.2 × 26 = 55.2. Nifty closes higher on days 2 to 5, but the histogram shrinks from day 2 and the MACD line peaks on day 2. On day 6 the MACD line crosses below the signal and the histogram turns negative. MACD is still well above zero, so the 12-day EMA remains above the 26-day: the trend is up, but its pace has slowed.
How traders use MACD
Signal-line cross
Zero-line cross
Divergence
- Decide which MACD signal your setup uses and on which timeframe; write it as one rule.
- At entry, log MACD above or below zero and whether the histogram is rising or falling.
- Tag trades where MACD agreed with the daily trend and where it did not.
- After 30 or more trades per tag, compare expectancy; drop the signal if it does not separate results.
Limits and common mistakes
MACD is built from moving averages, so it lags price: a cross often comes after a good part of the move has happened. In sideways markets the line hugs zero and crosses repeatedly. Divergences can persist through long trends, with momentum readings fading while price keeps rising. Treat MACD as a description of trend pace that supports a setup you already have, not as a standalone buy and sell rule.
Two mistakes recur in reviews. One is changing settings to fit recent trades, for example 8, 21, 5 after a week of late signals; the next week tends to need different numbers again. The other is stacking MACD with RSI and stochastic, which are all built from the same price series and tend to agree, so three confirmations add little that one did not already show.
Reference guide
| Context | Value | Reading |
|---|---|---|
| MACD signal taken in the direction of the higher-timeframe trend | Filtered | Crosses with the trend are easier to manage than crosses against it; tag both and compare |
| Every signal-line cross traded in a sideways market | Whipsaw | MACD crosses back and forth around zero in ranges; each cross pays charges |
| MACD value compared across instruments | Wrong scale | MACD is in points, so Bank Nifty’s is larger than Nifty’s; use PPO to compare |
Questions
What are the standard MACD settings?
12, 26 and 9: a 12-period EMA minus a 26-period EMA, with a 9-period EMA of that difference as the signal line. They are the default on most platforms.
How is MACD calculated?
Subtract the 26-period EMA from the 12-period EMA to get the MACD line, take a 9-period EMA of it for the signal line, and subtract the signal from MACD for the histogram.
What does the MACD histogram show?
The gap between the MACD line and its signal line. A shrinking histogram means momentum is slowing even if price is still moving in the same direction.
Is MACD good for intraday trading?
It is used on 5- and 15-minute charts, but it lags and whipsaws in ranges. Many intraday traders use it as a trend filter alongside price levels and VWAP rather than as the trigger.
What is a MACD divergence?
When price makes a new high or low that MACD does not confirm. It shows fading momentum and can last a long time before price turns, so it is usually combined with a price trigger.