MACD Indicator Explained: Formula, Settings and How to Use It

Updated: · 9 min read · TradeGid

MACD tells you whether price momentum is building or fading. It is the gap between two exponential moving averages, the 12 EMA and the 26 EMA, plus a signal line and a histogram. It does not predict price and it lags, but it filters noise well and keeps you from trading against momentum.

Contents
  1. What is the MACD indicator
  2. How to set up MACD on TradingView
  3. How to read MACD: four signals
  4. Is MACD leading or lagging
  5. MACD trade example on crypto futures
  6. Combining MACD with RSI and volume
  7. Common MACD mistakes

What is the MACD indicator

MACD full form: Moving Average Convergence Divergence. Gerald Appel developed it in the late 1970s. The idea is simple: when a fast moving average pulls away from a slow one, momentum is growing. When they converge again, momentum is fading.

On TradingView, MACD sits in its own pane below the chart. Unlike RSI, it has no 0–100 range and no fixed overbought or oversold levels. Its values are in price units: on Bitcoin MACD can read in the hundreds of dollars, on a coin priced at $0.50 it reads in thousandths.

MACD components: two lines and a histogram

  • MACD line = 12 EMA − 26 EMA of closing prices. Above zero, the fast average is above the slow one. Below zero, the opposite.
  • Signal line = 9 EMA of the MACD line itself. It is a smoothed, slower copy of MACD.
  • Histogram = MACD line − signal line. Bars grow when MACD pulls away from the signal line and shrink as the two converge.
  • Zero line = the point where the 12 EMA and 26 EMA are equal. A cross through zero means the short average crossed the long one.

All parts come from the same two EMAs, so MACD confirms a move that has already started rather than calling it in advance.

MACD formula and calculation example

Say on the 4-hour ETH chart the 12 EMA is 2,410 and the 26 EMA is 2,380. The MACD value is 30. If the signal line is at 22, the histogram reads 8. The next candle closes higher, the 12 EMA reacts more, MACD rises to 34 and the histogram to 10. Upside momentum is accelerating.

Why is the short EMA faster? In an EMA the weight of the latest price is 2 / (N + 1). For the 12 EMA that is about 15%, for the 26 EMA about 7%. A new candle moves the 12 EMA roughly twice as much, and that gap is what MACD measures.

MACD indicator below a candlestick chart: the MACD line crosses above the signal line and the histogram turns positive
Blue line is MACD, orange is the signal line, bars are the histogram. The marker shows a bullish crossover.

How to set up MACD on TradingView

  1. Add the indicatorClick the indicators button in the top toolbar or press /, type MACD and pick the built-in indicator, not one of the many community scripts with a similar name.
  2. Open the settingsHover over the MACD name in the top-left corner of its pane and click the gear icon.
  3. Check the inputsFast length 12, slow length 26, source close, signal smoothing 9. Oscillator and signal line MA type can be switched between EMA and SMA. For classic MACD, keep EMA.
  4. Use a higher timeframe if neededThere is a timeframe field: on a 15-minute chart you can display MACD calculated on 4-hour candles. The wait-for-close option keeps the value from repainting until that higher-timeframe bar closes.
  5. Set an alertAlt + A opens a new alert. Use a MACD and signal line cross or a histogram sign change, so you do not have to watch the screen.

Setup takes a minute. Save your indicators as a template and they load on any new chart in one click.

The free Basic plan on TradingView allows 2 indicators per chart, Essential 5 and Plus 10 (as of October 2026, see the plan comparison). MACD plus RSI fits inside the free limit.

Open TradingView

Best MACD settings for intraday and swing trading

The default 12, 26, 9 counts candles, not days, so it works on any timeframe. On a 1-minute chart 26 candles is 26 minutes, on the 1-hour chart a little over a day. One crypto detail: the market trades 24/7, so 26 daily candles are 26 calendar days, while for stocks the same 26 trading days stretch to almost five weeks.

How traders commonly set MACD on different timeframes
TimeframeSettingsWhat to keep in mind
1 min, 5 min12, 26, 9; some speed it up to 8, 17, 9Lots of false crosses. Only take signals in the direction of the higher-timeframe MACD
15 min12, 26, 9Common intraday choice, filter with the 1h or 4h MACD
1 hour12, 26, 9Trades lasting a few hours to a couple of days
4 hours, 1 day12, 26, 9; 24, 52, 18 for a smoother readFew crosses, zero line and divergence matter more
1 week12, 26, 9Overall market phase, too slow for entries

There is no universally best setting. If you change the inputs, test them on the history of the same coin and timeframe.

How to read MACD: four signals

MACD and signal line crossover

MACD crossing above the signal line means short-term momentum turned up, crossing below means it turned down. It is the most frequent and noisiest signal. Below zero in a higher-timeframe uptrend it often marks the end of a pullback. In a downtrend it is often just a pause.

Zero line cross

MACD crossing zero is the 12 EMA crossing the 26 EMA. It is slower but cleaner: above zero the market is in an up phase, below zero in a down phase. I use zero as a filter. I look for longs when the higher-timeframe MACD is above zero and shorts when it is below.

MACD histogram

The histogram is the fastest part of the indicator. Growing bars mean momentum is accelerating. Shrinking bars mean the lines are converging and a cross is close. A shrinking histogram after a strong move is a reason to tighten a stop or take partial profit, not a reason to flip the position.

MACD divergence

Bullish divergence: price makes a lower low while MACD or the histogram makes a higher low. Bearish divergence is the reverse at highs. It tells you the move is losing strength. In a strong trend you can get two or three divergences in a row before price actually turns, so I never enter on divergence alone without price confirmation.

Bullish MACD divergence: price makes a new low while the MACD line is already turning up
Price hit a new low, but MACD has already turned up. Sellers are running out of steam.
MACD signals cheat sheet
SignalWhat it meansWhere it helps most
MACD crosses above signalShort-term momentum turned upBelow zero in a higher-timeframe uptrend: end of a pullback
MACD crosses below signalMomentum turned downAbove zero in a higher-timeframe downtrend: end of a bounce
MACD above zero12 EMA above 26 EMA, up phaseFilter: longs only
MACD below zero12 EMA below 26 EMA, down phaseFilter: shorts only
Histogram shrinkingMove is slowing downTighten stop, take partial profit
Bullish divergencePrice lower, MACD higherAt support, with a confirming candle
Bearish divergencePrice higher, MACD lowerAt resistance after a long rally

No signal works on its own. Higher-timeframe trend and price levels first, then MACD.

Interactive

Try MACD on a live chart

Switch the market to range and count how many MACD crosses appear without any real move. Then switch back to an uptrend and compare which signals would have helped.

Is MACD leading or lagging

Lagging. It is built entirely from moving averages, and moving averages are always calculated from past candles. The histogram reacts earlier than the lines, but it still trails price. That makes MACD better as a confirmation tool and filter than as a way to catch exact turns.

The main weakness follows from that: in a sideways market the lines keep crossing and each cross is a false signal. The second limit is the absolute scale. Comparing Bitcoin's MACD with an altcoin's makes no sense. If you need a percentage version, traders use PPO: the same formula divided by the slow EMA.

MACD trade example on crypto futures

Here is a setup I use often, with round illustrative numbers. Instrument: ETHUSDT perpetual futures, a long in the direction of the trend. This shows the logic, it is not a signal.

  1. Context on the 4-hour chartPrice above the 50 EMA, MACD above zero. Higher-timeframe trend is up, so I only look for longs.
  2. Pullback on the 1-hour chartPrice pulls back to old resistance around 2,380–2,400. The hourly MACD drops below its signal line and moves toward zero.
  3. TriggerThe hourly MACD crosses above the signal line on a closed candle, the histogram turns green and volume on that candle is above average. Entry at 2,400.
  4. Stop based on price, not on the indicatorStop below the pullback low at 2,340, which is 2.5% from entry. If price gets there, the idea is broken whatever MACD says.
  5. Position sizeAccount 1,000 USDT, risk 1% per trade = 10 USDT. 10 / 2.5% = 400 USDT position. With 5x leverage the margin is 80 USDT.
  6. ExitTarget 2,520, which is +5% or +20 USDT against 10 USDT of risk. If the 4-hour histogram starts shrinking earlier and the hourly MACD crosses down, I close half and move the stop to breakeven.

MACD only handles timing and trade management here. Direction comes from the higher timeframe, risk comes from the stop and position size.

Long trade on a MACD signal in crypto futures: entry, stop below the pullback low, take profit and liquidation price
The stop sits far above liquidation, so the trade closes on your terms before the exchange liquidates it.

Note that leverage does not change the 10 USDT risk. The stop and position size set it, 5x only reduces margin. With isolated margin, liquidation on this long would sit roughly 19–20% below entry, far beyond the stop. See how it works in the guides on leverage and liquidation, and use the position size calculator to size trades.

Bybit

Bybit lists USDT perpetual futures on ETH and many altcoins. You can sign up through our link, the referral code is added automatically.

Sign up on Bybit
Referral code: J8NKMG

The code can only be entered during sign-up.

Combining MACD with RSI and volume

  • RSI shows overheating. A long on a MACD cross when RSI is already above 70 is often buying the end of a move. Better when MACD turns up and RSI is only just leaving the 30–50 zone.
  • Volume. A cross on above-average volume is more reliable than one on a thin market at night or on weekends, when small orders move price.
  • Moving averages on price. I only take MACD signals in the direction of the 50 and 200 EMA. Against them, I skip.
  • Levels. MACD knows nothing about support and resistance. A signal at a level is worth more than the same signal in the middle of a range.

MACD answers one question: is there momentum. Levels, RSI and volume tell you where to enter and how stretched the market is.

Common MACD mistakes

  1. Entering on a cross before the candle closes. The lines can separate again and the signal disappears.
  2. Trading every cross in a range. Without a trend, MACD becomes a fee generator.
  3. Looking for overbought levels like on RSI. MACD has no fixed bounds, a high reading on one coin is normal on another.
  4. Curve-fitting settings to the last month. Inputs that nailed the previous move often fail on the next one.
  5. Using a cross back as a stop instead of a price stop. By the time MACD crosses back, price can be far past a sensible risk.
  6. Fighting a strong trend because of one divergence. Divergence warns, it does not reverse the market.

Almost every mistake comes down to using MACD as a standalone system instead of a filter on top of trend and levels.

Binance
Sign up on Binance
Referral code: 58328288
Bybit
Sign up on Bybit
Referral code: J8NKMG
OKX
Sign up on OKX
Referral code: K2FMEIJ3
Bitget
Sign up on Bitget
Referral code: BGGAPKEJ
Gate
Sign up on Gate
Referral code: UVRGV1FX
TradingView
Open TradingView

Charts, indicators and alerts

FAQ

What is the full form of MACD?
Moving Average Convergence Divergence. It measures how far the 12 EMA and 26 EMA converge or diverge, and smooths that gap with a 9 EMA signal line.
What are the best MACD settings?
The default 12, 26, 9 works on any timeframe because it counts candles. Faster settings give more signals and more noise. There is no single best setting for every coin, so test any change on history.
Is MACD a leading or lagging indicator?
Lagging. It is built from moving averages. The histogram reacts earlier than the lines, but still after price.
What does a negative MACD mean?
The 12 EMA is below the 26 EMA, so the market is in a down phase. It is not automatically a short signal: if the histogram is rising, the decline is slowing.
What is the MACD accuracy rate?
There is no honest universal figure. Results depend on the market, timeframe, filters, stops and fees. A fixed win rate for MACD is marketing, not statistics.