TradingMarble
Indicators

MACD indicator explained: crossover, histogram and 12 26 9 settings

8 min read

What is the MACD indicator?

The MACD indicator (Moving Average Convergence Divergence) was developed by Gerald Appel in the late 1970s. It turns two exponential moving averages into one momentum line, so you can see whether the short-term trend is pulling away from the longer one or coming back to it.

When the fast EMA moves away from the slow EMA, the averages diverge and momentum is building. When they move closer, they converge and momentum is fading. That is all the name means.

MACD is a trend-following momentum tool. It is useful for judging whether momentum agrees with a move, and less useful for picking exact turning points.

MACD line = EMA(12) − EMA(26)
signal line = EMA(9) of the MACD line
histogram = MACD line − signal line

MACD settings 12 26 9 explained

The standard MACD settings 12 26 9 mean:

  • 12: the fast EMA length.
  • 26: the slow EMA length.
  • 9: the EMA length of the signal line, calculated on the MACD line itself.

These numbers came from a time when markets traded six days a week (12 is two weeks, 26 about a month). They stuck because everyone uses them. Faster settings such as 5 35 5 or 8 21 5 are sometimes used intraday, but they create more noise. For the best MACD settings for intraday, most traders keep 12 26 9 and choose the chart timeframe that fits their holding period.

MACD is measured in price points, not a 0 to 100 scale. A MACD value of 25 on NIFTY means the 12 EMA is 25 points above the 26 EMA, so values are not comparable across instruments with very different prices.

The three parts: MACD line, signal line, histogram

MACD line

The distance between the 12 and 26 EMA. Above zero means the fast average is above the slow one, so the short-term trend is up.

Signal line

A 9 EMA of the MACD line. It is a smoothed, slower copy, so MACD crossing it marks a change in the direction of momentum.

MACD histogram

The MACD histogram is the MACD line minus the signal line, drawn as bars. It shows the gap between the two lines and, more importantly, whether that gap is growing or shrinking. A histogram that shrinks while price still makes progress tells you momentum is slowing before the lines actually cross. Many traders find the histogram the most useful part.

0MACD (12, 26, 9)MACD linesignal linecrossoverhistogram = MACD − signalbars shrink: momentum fadingIllustration
Watch the MACD line cross its signal line; the histogram bars are the gap between the two and shrink as the move slows.

MACD crossover and the zero line

Signal-line crossover

A MACD crossover above the signal line shows momentum turning up; below shows momentum turning down. Because both lines are derived from EMAs, the crossover comes after price has already turned. In choppy markets, crossovers flip back and forth near zero and mean little.

Zero-line cross

The MACD zero line cross is the same event as the 12 EMA crossing the 26 EMA. It is slower and marks a change in the short-term trend itself. Signal-line crosses far above zero (in an uptrend) or far below zero (in a downtrend) carry different meaning from crosses near zero.

Reading crossovers in context

  • A bullish crossover while MACD is above zero is a momentum resumption inside an uptrend.
  • A bullish crossover deep below zero is only a slowing of a downtrend; the trend is still down.
  • Crossovers right at zero with flat lines usually mean no trend.

MACD divergence

MACD divergence is when price makes a new high or low that the MACD line or histogram does not confirm.

  • Bearish: price makes a higher high; MACD makes a lower high.
  • Bullish: price makes a lower low; MACD makes a higher low.

Because MACD is in price units, it naturally shrinks in quieter conditions. A divergence can therefore reflect lower volatility rather than true weakness. That is why divergence is best read at levels that already matter, such as a liquidity sweep of the previous day high, with the footprint or delta divergence as a second view.

Divergence can repeat in a strong trend. Wait for price to confirm, for example by breaking a short-term swing.

MACD vs RSI

MACDRSI
Built fromEMAs of priceAverage gains vs losses
ScalePrice points, unbounded0 to 100
Best atTrend momentum, directionStretch, regime, divergence
Overbought/oversoldNot defined70 / 30

They overlap a lot. Using both rarely adds much; pick one momentum tool and learn it. See the RSI guide for comparison.

A MACD framework for intraday NIFTY

  1. Find the trend on a higher timeframe with moving averages or structure.
  2. Mark levels: VWAP, previous day high and low, opening range.
  3. On the trading timeframe, watch pullbacks into a level while MACD stays on the trend side of zero.
  4. Watch the histogram: a pullback where the histogram shrinks toward zero and then expands again in the trend direction shows momentum returning.
  5. Confirm with price action and order flow at the level.
  6. Decide where the idea is invalid and size the position from there; read position sizing.

Worked example: NIFTY histogram fade (illustration)

The following is an illustration with plausible numbers.

NIFTY futures trend down from 24,400 to 24,180 in the first two hours. On the 5-minute chart, MACD is at −32 with the histogram at −9. On the next push to 24,150, the histogram is only −3, and on a final push to 24,135 (just under the previous day low of 24,140) the histogram is already positive while MACD stays below zero.

Price closes back above 24,140, and the footprint at the low shows heavy selling absorbed. Momentum is clearly fading, and price has swept a known low. Still, MACD is below zero, so the larger short-term trend has not turned. A trader studying this would treat it as a possible pause or reversal, not a certainty, and watch whether price can reclaim VWAP.

Common MACD mistakes

  • Trading every crossover, especially near zero in ranges.
  • Comparing MACD values between NIFTY and a ₹500 stock; the units differ.
  • Treating divergence as a reversal on its own.
  • Adding MACD to a chart full of EMAs; it is the same information.
  • Ignoring lag: MACD is an average of averages.

Trading F&O carries a high risk of loss; indicators describe, they do not decide.

How to set up MACD on a chart, step by step

  1. Choose the chart: NIFTY or BANKNIFTY futures, or an F&O stock. Spot works too, since MACD only needs prices.
  2. Pick a timeframe that matches your holding period: 5-minute for intraday swings, 15-minute or 1-hour for multi-hour moves, daily for positional views.
  3. Add MACD with 12 26 9 and leave the source as close.
  4. Look at the zero line first. Which side is MACD on, and for how long?
  5. Look at the histogram second. Is it expanding or contracting?
  6. Only then look at crossovers.

Using MACD on two timeframes

A common approach is to read MACD on a higher timeframe for direction and on a lower timeframe for timing. For example, the 1-hour MACD above zero and rising sets the bias, while the 5-minute histogram turning back up after a pullback shows momentum returning in that direction. See multi-timeframe analysis.

MACD and volatility

Because MACD is in price units, it grows on volatile days and shrinks on quiet days. A MACD of 40 on a 300-point NIFTY day is less extreme than a MACD of 20 on a 90-point day. Comparing it with ATR keeps readings in proportion.

Histogram patterns traders watch

  • Peak and turn: the histogram prints its largest bar and then shrinks. Momentum has peaked, even if price keeps drifting.
  • Zero-line flip: the histogram crosses zero, which is the same event as a signal-line crossover.
  • Divergent peaks: two histogram peaks, the second smaller, while price makes a new extreme.

Seeing it on the TradingMarble chart

The TradingMarble chart shows MACD with its histogram under NIFTY, BANKNIFTY and F&O charts, alongside structure, VWAP and the footprint. You can compare how the histogram behaves at levels with what buyers and sellers did inside the candles. See the features page for the full list.

MACD checklist

  1. Which side of zero is MACD?
  2. Is the histogram growing or shrinking?
  3. Is the crossover near zero (weak) or in a trend (meaningful)?
  4. Is price at a level?
  5. Does price confirm any divergence?

Used as a momentum gauge rather than a trigger, the MACD indicator gives a clear read of whether a trend is gaining or losing energy.

Frequently asked questions

What is MACD in trading?

MACD, Moving Average Convergence Divergence, is a momentum indicator equal to the 12-period EMA minus the 26-period EMA. A 9-period EMA of that line is the signal line, and the difference between them is the histogram. It shows whether short-term momentum is strengthening or weakening relative to the longer trend.

What does MACD 12 26 9 mean?

12 is the fast EMA, 26 the slow EMA and 9 the EMA used for the signal line. The MACD line is EMA(12) minus EMA(26); the signal line is the 9-period EMA of the MACD line. These are the default settings on almost every platform.

How do you read the MACD histogram?

The histogram is the MACD line minus the signal line. Bars above zero mean MACD is above its signal; below zero means it is under. Growing bars mean momentum is accelerating; shrinking bars mean it is slowing. A shrinking histogram often appears before the lines cross.

Is MACD crossover reliable?

MACD crossovers lag because they are built from moving averages, and they whipsaw in sideways markets. They tend to be more meaningful in trending conditions, in the direction of the trend and away from the zero line. Traders usually combine them with levels and price action rather than using them alone.

What are the best MACD settings for intraday?

Most intraday traders keep the default 12 26 9 on 5-minute or 15-minute charts. Faster settings like 8 21 5 react sooner but produce more noise. Choosing a suitable chart timeframe usually helps more than changing the lengths.

Is MACD better than RSI?

They measure momentum differently. MACD tracks the gap between two EMAs in price units and suits trend direction; RSI uses a 0 to 100 scale and suits stretch and regime reading. Neither is better overall. Using one and learning its behaviour well usually beats stacking both.