Start scanning
Indicators

MACD Indicator: How It Works and How to Scan It

Understand MACD (12/26/9), its signal line, histogram and zero line, plus how to scan NSE stocks for bullish and bearish MACD crossovers.

By the ChartScanX team · Updated 24 Nov 2026 · Educational content, not investment advice

MACD stands for Moving Average Convergence Divergence. Created by Gerald Appel, it shows the relationship between two exponential moving averages (EMAs) of price and is used to judge the direction and strength of momentum. Because it produces clear, rule-based events such as line crossovers and zero-line crosses, it is a natural fit for stock scanners.

This guide covers how MACD is built, what its three components tell you, where it fails, and how to find MACD setups across NSE stocks on ChartScanX.

The three components

With the standard 12/26/9 settings:

  • MACD line: the 12-period EMA of close minus the 26-period EMA of close.
  • Signal line: a 9-period EMA of the MACD line.
  • Histogram: the MACD line minus the signal line, usually drawn as bars.

Because an EMA gives more weight to recent prices, the 12-period EMA reacts faster than the 26-period EMA. When price rises steadily, the fast EMA pulls away above the slow one and the MACD line climbs. When the rise slows, the fast EMA flattens toward the slow one and MACD turns down even though price may still be rising. That is the "convergence" and "divergence" in the name.

Illustrative example

These numbers are invented to show the mechanics. Suppose a stock's 12-day EMA is 1,050 and its 26-day EMA is 1,030. The MACD line is 20. If the signal line (a smoothed average of recent MACD values) is 15, the histogram is +5. A few sessions later the stock stalls: the 12-day EMA is 1,055 and the 26-day is 1,045, so MACD falls to 10 while the signal line has only eased to 14. The histogram is now -4, and MACD has crossed below its signal line even though price is still above both EMAs. The crossover is reporting that momentum has cooled, not that price has fallen.

How traders read MACD

Signal line crossovers

A bullish crossover (MACD above signal) indicates improving momentum, and a bearish crossover (MACD below signal) indicates fading momentum. These are the most common MACD events and the basis of most MACD scans.

Zero-line position

Zero is where the two EMAs are equal.

Position Meaning
MACD above zero Fast EMA above slow EMA, the shorter-term trend is stronger
MACD below zero Fast EMA below slow EMA, the shorter-term trend is weaker
Crossing zero from below Fast EMA has just moved above slow EMA

A bullish signal-line crossover that happens above zero is generally viewed as more in agreement with an existing uptrend than one that happens deep below zero, where it may only be a small bounce inside a downtrend.

Histogram

The histogram shows the gap between MACD and signal. Shrinking bars suggest momentum is losing steam in the current direction. Growing bars suggest momentum is building. Because it is a difference of a difference, the histogram can be jumpy on volatile days.

Divergence

If price makes a new high but MACD makes a lower high, momentum is not confirming the move. As with RSI divergence, it is subjective and can persist for a long time, so it is a prompt to look closer, not a trigger.

Limits and false signals

  • MACD lags. By the time a crossover prints, a meaningful part of the move may be done.
  • In sideways, range-bound markets MACD lines cross repeatedly and produce many whipsaws.
  • Crossovers say nothing about volume, news, or valuation.
  • The absolute MACD value depends on the stock's price level, so you cannot compare raw MACD values between a Rs 100 stock and a Rs 5,000 stock. Compare shapes and crossovers, not magnitudes.
  • Intraday signals during the 09:15 to 09:30 IST open are often distorted by gaps and the opening auction.

How to scan for it on ChartScanX

ChartScanX runs the standard 12/26/9 MACD across NSE stocks and lists the ones where the stated condition has occurred. These are matches, not trade instructions.

A practical workflow

  1. Start with the bullish crossover scan and sort by traded value so that liquid names come first.
  2. Open each chart and note whether the stock is above or below its 200-day average. A crossover in an established uptrend has a different character from one in a downtrend.
  3. Check RSI to see whether momentum was already stretched.
  4. Look at a higher timeframe. A daily crossover that agrees with a weekly crossover is a stronger statement than one that conflicts with it. Multi-timeframe scanning explains this approach.
  5. Define your own risk first. The scan only narrows the list.

Changing the settings

12/26/9 is the standard and is what most traders see by default, which is part of why it is watched. Faster settings such as 8/17/9 produce earlier but noisier signals. Slower settings such as 19/39/9 produce fewer, later signals. There is no objectively best set; tuning until the past looks perfect is curve fitting and tends to fail on new data.

MACD and the Indian market

Nifty 50 constituents with deep liquidity produce relatively orderly MACD behaviour on daily charts. In smaller NSE stocks, circuit limits, thin order books, and event gaps can create abrupt MACD swings that do not reflect a gradual shift in trend. After a results announcement or a large block deal, MACD often moves sharply in a single session; in those cases the crossover is mostly a reflection of the event. Weekly MACD is useful for filtering out day-to-day noise when you are screening a large universe.

Combining MACD with other tools

MACD works best as a momentum confirmation inside a broader read of the chart. A common combination is trend (a moving average or Supertrend), momentum (MACD or RSI), and volatility (such as Bollinger Bands). Each answers a different question, so agreement across them is more informative than three versions of the same signal. For the general scanning process, see how to scan stocks.

Reading the histogram in practice

A useful habit is to note whether the histogram is rising or falling relative to its previous bar, as well as whether it is positive or negative. A positive but shrinking histogram says the uptrend is still in place but its push is easing. A negative but shrinking histogram says selling pressure is easing. These subtle shifts often appear a candle or two before the actual crossover, which makes them a useful early prompt to open the chart and look closer.

Common mistakes

  • Trading every crossover without checking the trend or market context.
  • Expecting MACD to catch tops and bottoms; it is a lagging confirmation tool.
  • Comparing raw MACD values between stocks of very different prices.
  • Optimising settings until a backtest looks perfect, then expecting it to hold.
  • Ignoring whipsaw risk in sideways markets.
  • Treating a scan match as a recommendation rather than a shortlist to study.

Frequently asked questions

What are the standard MACD settings?

The standard settings are 12, 26 and 9. The MACD line is the 12-period EMA minus the 26-period EMA, and the signal line is a 9-period EMA of the MACD line.

What is a MACD crossover?

A bullish crossover happens when the MACD line moves above the signal line, and a bearish crossover when it moves below. It signals that short-term momentum has changed direction relative to its recent average.

Does the MACD zero line matter?

Yes. When MACD is above zero, the 12-period EMA is above the 26-period EMA, meaning the shorter trend is stronger. Crossovers that occur above zero are often considered more aligned with an existing uptrend.

Is MACD a leading or lagging indicator?

It is lagging, because it is built from moving averages of past prices. The histogram can turn slightly earlier than the lines, but MACD does not predict price.

Can MACD be used on intraday charts?

Yes, but signals are noisier. On 5 or 15 minute charts of NSE stocks, crossovers can reverse within a few candles, so many traders confirm with a higher timeframe.