Article

What Is MACD and How to Read the MACD Indicator

Moving average convergence divergence (MACD) is a momentum and trend indicator built from the gap between the 12 period exponential moving average (EMA) and the 26 period EMA, with a signal line and a histogram added on top. MACD helps traders see the direction of a trend and whether the momentum behind it is building or fading. Reading MACD well means knowing its four parts, its calculation, its 12, 26 and 9 settings and when each MACD signal fails.

Key Takeaways

  • Moving average convergence divergence (MACD) is a momentum and trend indicator built from the gap between the 12 period EMA and the 26 period EMA.
  • MACD has four parts, the MACD line, the signal line, the histogram and the zero line, shown in a panel under the price chart.
  • The default MACD settings of 12, 26 and 9 set the periods for the two EMAs and the signal line in the indicator.
  • Traders read MACD through four signals, which are signal line crossovers, zero line crossovers, divergence and changes in the histogram.
  • No single good MACD value exists because MACD is measured in price units, so a reading only makes sense against its own past on that chart.
  • MACD has no fixed overbought or oversold level, while RSI moves on a fixed 0 to 100 scale with standard levels at 70 and 30.
  • MACD is a lagging indicator, so MACD signals come after price has moved and give many false signals in a sideways market.

What Is MACD?

MACD is a momentum and trend indicator that tracks the gap between two exponential moving averages (EMAs) of price, the 12 period EMA and the 26 period EMA. An EMA is an average of recent closing prices that updates with every new price.

MACD shows trend and momentum in one indicator. The position of MACD above or below zero points to the trend, and the size of the gap between the two EMAs shows whether momentum is building or fading. Momentum is the strength behind a price rise or fall.

The name MACD describes how the two EMAs behave. Convergence means the 12 period EMA and the 26 period EMA are moving closer together, which usually happens as a trend loses momentum. Divergence means the two EMAs are moving apart, which usually happens as a trend gains momentum. The divergence in the name is different from the MACD divergence signal, where price and MACD disagree.

Gerald Appel created MACD in the late 1970s. On a chart, MACD sits in a separate panel under the price chart and has no fixed top or bottom, because MACD values grow or shrink with the price of the market being traded. Inside that panel, MACD shows up as four parts.

The Four Parts of the MACD Indicator

MACD has four parts, the MACD line, the signal line, the histogram and the zero line, and all four sit together in the MACD panel under the price chart. Each MACD part answers a different question about momentum.

Annotated MACD indicator chart under a price chart, labelling the MACD line, signal line, MACD histogram and zero line

PartWhat it isHow it is calculatedWhat it shows
MACD lineThe faster of the two lines12 period EMA minus 26 period EMAShort term momentum compared with the longer trend
Signal lineThe slower line9 period EMA of the MACD lineA smoothed MACD line that acts as a trigger when the lines cross
HistogramBars above and below the zero lineMACD line minus signal lineHow far apart the two lines are, which shows whether momentum is growing or fading
Zero lineThe middle lineThe level where the 12 period EMA and the 26 period EMA are equalUpward momentum when MACD is above zero and downward momentum when MACD is below zero

MACD Line

The MACD line is the 12 period EMA minus the 26 period EMA. The MACD line moves faster than the signal line because the MACD line reacts to price changes first. When the 12 period EMA is above the 26 period EMA, the MACD line sits above the zero line, which points to bullish momentum, meaning buyers are in control. When the 12 period EMA is below the 26 period EMA, the MACD line sits below the zero line, which points to bearish momentum. MACD adds a slower line to smooth the MACD line.

MACD Signal Line

The signal line is a 9 period EMA of the MACD line, not of price. The signal line moves more slowly and smooths out the small ups and downs in the MACD line. Traders use the signal line as a trigger, since the moment the MACD line crosses the signal line is one of the most watched MACD signals. The gap between the MACD line and the signal line is drawn as the histogram.

MACD Histogram

The MACD histogram is the MACD line minus the signal line, drawn as bars above or below the zero line. Bars above the zero line mean the MACD line is above the signal line, and bars below the zero line mean the MACD line is below the signal line. Taller bars mean the two lines are further apart.

The histogram does not show trading volume, even though its bars look like a volume chart. Thomas Aspray is credited with adding the histogram to MACD in 1986. The histogram and the MACD line both move around one reference line, the zero line.

MACD Zero Line

The MACD zero line is the middle line of the MACD panel, and MACD reads zero when the 12 period EMA and the 26 period EMA are equal. When the MACD line is above the zero line, the 12 period EMA is above the 26 period EMA, which points to upward momentum. When the MACD line is below the zero line, the 12 period EMA is below the 26 period EMA, which points to downward momentum. A MACD line far from the zero line means a big gap between the two EMAs. All four MACD parts come from one simple calculation.

How Is MACD Calculated?

MACD is calculated from closing prices in three steps, first the MACD line, then the signal line, then the histogram. Most charting platforms calculate MACD automatically, so traders only need to understand the logic behind each step.

MACD calculation steps from the 12 and 26 period EMAs to the MACD line, 9 period EMA signal line and histogram, above a MACD chart

MACD Formula

MACD line = 12 period EMA minus 26 period EMA

Signal line = 9 period EMA of the MACD line

Histogram = MACD line minus signal line

An EMA gives more weight to recent prices than to older prices, so an EMA reacts faster than a simple moving average, which weights every price equally. Each new EMA value comes from this formula.

EMA = closing price × multiplier + previous EMA × (1 minus multiplier)

Multiplier = 2 ÷ (number of periods + 1)

For the 12 period EMA, the multiplier is 2 ÷ 13, which is about 0.1538. A multiplier of 0.1538 means each new closing price makes up about 15% of the new 12 period EMA.

Step by Step MACD Calculation Example

  1. Update the 12 period EMA with the newest closing price. Using example numbers, not real market data, if the new closing price is $102 and the previous 12 period EMA was $100, the new 12 period EMA = 102 × 0.1538 + 100 × 0.8462, which is about $100.31.
  2. Update the 26 period EMA the same way, with a multiplier of 2 ÷ 27, or about 0.0741, so each new price carries less weight.
  3. Subtract the 26 period EMA from the 12 period EMA to get the MACD line. If, on a later day, the 12 period EMA is $105 and the 26 period EMA is $100, the MACD line = $105 minus $100 = $5.
  4. Take the 9 period EMA of the MACD line to get the signal line, which is $4 in the example.
  5. Subtract the signal line from the MACD line to get the histogram, so the histogram = $5 minus $4 = $1.

The MACD value of $5 is in the same units as price, so a $5 MACD cannot be compared with a $5 MACD on a different market or price level. The 12, 26 and 9 in the calculation are the default MACD settings.

What Do the MACD Settings 12, 26 and 9 Mean?

The MACD settings 12, 26 and 9 are the default number of periods in the three averages MACD uses, with 12 periods for the first EMA, 26 periods for the second EMA and 9 periods for the signal line. A period is one bar on the price chart, so on a daily chart 12 periods means 12 days and on a 1 hour chart 12 periods means 12 hours.

NumberWhat it setsAbout how long on the old six day week (daily chart)What it does
1212 period EMAAbout 2 weeksReacts quickly to recent price changes
2626 period EMAAbout 1 monthFollows the longer trend
9Signal line, a 9 period EMA of the MACD lineAbout 1.5 weeksSmooths the MACD line and gives crossover signals

The common explanation for the three numbers is that markets used to trade six days a week. On a six day week, 12 periods covered about two weeks of trading, 26 periods about one month and 9 periods about a week and a half.

MACD settings can be changed. Shorter settings make MACD react faster but give more false signals, while longer settings react more slowly and give fewer signals. A setting of 5, 35 and 5 is a known faster setup for short term trading, and trader Linda Bradford Raschke is known for an even faster 3, 10 and 16 version, built from simple moving averages instead of EMAs. Most traders keep 12, 26 and 9, the default on charting platforms. With the settings in place, reading MACD comes down to four signals.

How to Read the MACD Indicator

Traders read MACD through four signals, which are signal line crossovers, zero line crossovers, divergence and changes in the histogram, and each MACD signal is a sign of changing momentum with no guarantee attached. MACD signals tend to be more reliable when they point in the same direction as the main trend. Higher timeframes, where each bar on the price chart covers more time, give fewer and steadier MACD signals.

SignalWhat happensWhat it may meanWhen it fails
Signal line crossoverThe MACD line crosses above or below the signal lineMomentum is turning up when the MACD line crosses above and turning down when it crosses belowIn a sideways market the MACD line and signal line cross back and forth and give many false signals
Zero line crossoverThe MACD line crosses above or below zeroThe 12 period EMA has moved above or below the 26 period EMA, a possible trend changeA zero line crossover comes late, often after much of the trend has already happened
DivergencePrice makes a new high or low that MACD doesn't matchMomentum behind the trend may be fadingA strong trend can keep going long after divergence appears
Histogram changeHistogram bars grow or shrinkMomentum is getting stronger or weakerHistogram bars can shrink and grow again without any crossover

MACD Signal Line Crossover

A bullish crossover happens when the MACD line crosses above the signal line, which suggests upward momentum is building, and a bearish crossover happens when the MACD line crosses below the signal line.

  • A bullish crossover below the zero line is often read as an early sign that a downtrend may be turning, and above the zero line as upward momentum continuing.
  • A bearish crossover above the zero line is often read as an early sign that an uptrend may be turning, and below the zero line as downward momentum continuing.

Signal line crossovers happen often, so they give the most false signals of any MACD signal, especially in a sideways market, where price moves in a range with no clear trend. A signal line crossover shows a change in momentum and is not a buy or sell instruction on its own.

MACD chart marking a bullish crossover and a bearish crossover where the MACD line crosses the signal line, with matching points on price

A slower MACD signal comes from the MACD line crossing the zero line.

MACD Zero Line Crossover

When the MACD line crosses above the zero line, the 12 period EMA has moved above the 26 period EMA, which points to upward momentum. When the MACD line crosses below the zero line, the 12 period EMA has dropped below the 26 period EMA, which points to downward momentum.

  • A bullish zero line crossover is read by traders as a sign that an uptrend may have started.
  • A bearish zero line crossover is read by traders as a sign that a downtrend may have started.

MACD chart showing bullish and bearish zero line crossovers, with an uptrend after each bullish cross and a downtrend after the bearish cross

Zero line crossovers come later and less often than signal line crossovers, because the two EMAs take longer to cross than the MACD line and signal line do. A zero line crossover tends to confirm a trend change after the trend change has begun. Sometimes MACD and price disagree, and that disagreement is called divergence.

MACD Divergence

MACD divergence happens when price and MACD move in different directions, which suggests the momentum behind a trend may be fading. A higher high is a peak above the previous peak, and a lower low is a dip below the previous dip.

  • Bullish divergence forms when price makes a lower low but MACD makes a higher low, which suggests selling momentum is fading.
  • Bearish divergence forms when price makes a higher high but MACD makes a lower high, which suggests buying momentum is fading.

Divergence can last a long time in a strong trend, with price rising or falling well after divergence first appears. Traders usually wait for a signal line crossover to confirm divergence.

MACD bullish divergence chart where price makes a lower low while the MACD line makes a higher low, both marked with dashed lines

The histogram often shows momentum changing before the MACD line and the signal line cross.

Reading the MACD Histogram

Growing MACD histogram bars mean momentum in that direction is getting stronger, and shrinking histogram bars mean momentum is fading.

  • Growing bars above zero show upward momentum getting stronger.
  • Shrinking bars above zero show upward momentum fading, and a bearish crossover may follow.
  • Growing bars below zero show downward momentum getting stronger.
  • Shrinking bars below zero show downward momentum fading, and a bullish crossover may follow.

Histogram bars shrinking towards zero mean the MACD line and the signal line are getting closer. The histogram crosses zero at the exact moment the MACD line crosses the signal line, so a histogram cross above zero is the same event as a bullish crossover.

MACD histogram chart labelling growing and shrinking bars above and below zero as momentum building or momentum fading

A common next question is what MACD number counts as good.


What Is a Good MACD Value?

There is no single good MACD value, because MACD is measured in the same units as price and depends on how much the market’s price swings. For example, if a $10 stock and a $100 stock both rise by the same percentage, MACD on the $100 stock will read ten times bigger, even though both trends have the same strength. A MACD reading only makes sense against its own past readings on the same chart, and three checks say more than the number itself.

  • The position of MACD against the zero line shows whether the 12 period EMA is above or below the 26 period EMA.
  • The position of the MACD line against the signal line shows whether momentum is turning up or down.
  • The size of the histogram bars shows whether momentum is growing or fading.

Unlike the relative strength index (RSI), MACD has no fixed overbought or oversold level. Overbought means price has risen too far, too fast, and oversold is the opposite. A MACD reading far above its usual range on that chart can mean a trend is stretched, but a stretched reading alone is not a signal.

MACD vs RSI

MACD and RSI are both momentum indicators, but MACD and RSI measure different things. MACD follows the gap between two EMAs to show trend direction and momentum, while RSI measures the speed and size of recent price changes on a fixed scale from 0 to 100 to show when price may be stretched.

Side by side chart comparing MACD 12, 26, 9 with no fixed limits and RSI 14 on a 0 to 100 scale with overbought 70 and oversold 30 levels

PointMACDRSI
What it measuresThe gap between two EMAs, which shows trend direction and momentumSpeed and size of recent price changes
ScaleNo fixed top or bottom, moves around zeroFixed from 0 to 100
Main signalsSignal line crossovers, zero line crossovers, divergenceMoves above 70 or below 30, divergence
Overbought and oversoldNo fixed levelsAbove 70 overbought, below 30 oversold (standard levels)
Default setting12, 26 and 914 periods
Tends to work best inTrending marketsSideways markets

Neither indicator is better, because MACD and RSI answer different questions. MACD shows which way momentum is pointing and whether momentum is growing, while RSI shows whether price has moved unusually far in a short time. Many traders use MACD and RSI together, and combining the two is part of building a MACD trading strategy. Like every indicator, MACD has limits.

Limitations of MACD

The biggest limitation of MACD is lag, because MACD is a lagging indicator built from moving averages of past prices, so a MACD signal often appears after much of a price rise or fall has happened. MACD has five other limits.

  • MACD gives many false signals in a sideways market, because the MACD line and the signal line cross back and forth when there is no clear trend.
  • MACD has no fixed overbought or oversold level, so MACD cannot show on its own when price has gone too far, unlike RSI with its 70 and 30 levels.
  • MACD does not measure volatility, so a MACD signal looks the same whether price is swinging a little or a lot.
  • MACD gives no support or resistance levels, which are the prices where a market has often stopped falling or rising, so traders need other tools to decide where a stop loss or profit target sits.
  • Different MACD settings give different signals on the same chart, so a crossover on 12, 26 and 9 may not appear on 5, 35 and 5.

MACD signals are never guaranteed, so traders usually confirm a MACD signal with other tools such as RSI, moving averages or volume, and manage risk with a stop loss. A stop loss is an order that closes a trade automatically at a set price to limit the loss. Traders deal with these limits by building MACD into a full strategy.

Using MACD in a Trading Strategy

Traders build MACD into three common strategy types, which are signal line crossover strategies, zero line crossover strategies and divergence strategies. A MACD strategy turns the four MACD signals into fixed rules, so a trader knows in advance what counts as a valid signal and when a trade is wrong. Each MACD strategy usually adds a trend filter, such as only taking signals in the direction of a longer moving average, and a stop loss to limit the loss when a signal fails. The entry rules, exit rules and worked examples for each strategy are in the guide to MACD trading strategies.

FAQs

What Does the MACD Tell You?

MACD tells you which way momentum is pointing and whether that momentum is getting stronger or weaker. MACD does not tell you how far price will move, when a trend will end or whether a market is overbought, so traders pair MACD with other tools such as support and resistance levels.

Is MACD a Leading or Lagging Indicator?

MACD is a lagging indicator, because MACD is built from moving averages of past prices. Some traders watch the MACD histogram for earlier hints that momentum is changing, but every MACD signal still comes after price has moved.

Which Timeframe Works Best for MACD?

MACD works on any timeframe, and no single timeframe is best for every trader. The 12, 26 and 9 default was designed for daily charts, and higher timeframes give fewer false signals, while lower timeframes give more signals and more noise.

Does MACD Work for Forex, Stocks and Crypto?

MACD works on forex, stocks, crypto and any other market with price data, because MACD only needs closing prices. MACD values are in price units, so a MACD reading on a currency pair cannot be compared with a MACD reading on a stock or on bitcoin.

Is MACD a Good Indicator for Beginners?

MACD is one of the easier indicators for beginners to read, because MACD has clear crossovers and a zero line. Beginners should still practise reading MACD on a demo account, which uses virtual money, and confirm MACD signals with other tools before trading with real money.

Do Professional Traders Use MACD?

MACD is a standard indicator on most charting platforms and in technical analysis courses, and many traders use MACD as a confirmation tool. Experienced traders usually check a MACD signal against other analysis instead of trading MACD signals on their own.

A group of expert analyst with strengths in fundamental and technical analysis, and years of experience in the Global Equity Markets, Forex, Precious Metals, Oils and other commodities, as well as Crypto, and so on.
Join Over 1,000,000 clients on our award-winning trading platform
1
Apply for a Live
Account
2
Fund Your
Account
3
Start Trading
Instantly
Open Account