Charts See the terminal

Moving Average Convergence Divergence (MACD)

The gap between a fast and a slow exponential average, with a signal line and a histogram, used to read the direction and pace of a trend.

Momentum Add to chart

Live MACD preview · BTC/USDT · Binance

What is MACD?

MACD subtracts a slow exponential average of price from a fast one. When the fast average pulls away above the slow one the MACD line rises, and when it falls back the line drops. A second average of the MACD line, the signal line, is drawn with it, and the gap between the two is shown as histogram columns around a dashed zero line in a separate pane.

MACD shows how two averages of price are moving relative to each other. It is measured in price units, so its size cannot be compared across markets, and it does not predict future prices.

How to use MACD

  • The MACD line against zero. Above zero, the fast average is above the slow one, which is read as an uptrend. Below zero, the reverse.
  • MACD crossing its signal line. A cross above the signal line means the gap between the averages has started widening faster than its own average, and a cross below means it has started to narrow.
  • The histogram colours. Columns above zero are dark green while they grow and light green while they shrink. Below zero they are dark red while they grow more negative and light red while they shrink back towards zero. A change of shade shows the gap starting to turn before the lines cross.
  • Divergence from price. Price making a new high while MACD makes a lower high suggests the move is gaining ground more slowly.

These are ways to read the lines, not entry signals on their own.

Settings

SettingDefaultWhat it changes
Fast Length12 Bars in the fast exponential average. Lower makes MACD react sooner and more noisily. Minimum 1.
Slow Length26 Bars in the slow exponential average. Higher widens the gap between the averages and slows the line. Minimum 1.
Signal Smoothing9 Bars in the exponential average of the MACD line that forms the signal line. Lower gives earlier and more frequent crossings. Minimum 1.
SourceClose Which price both averages are taken from. Open, high, low and the averaged sources such as hl2 and hlc3 are also available.

Adjust the three lengths and the price source in the indicator settings.

Calculation

MACD is built from three exponential averages, one of them taken of the MACD line itself:

MACD      = EMA(price, 12) - EMA(price, 26)
Signal    = EMA(MACD, 9)
Histogram = MACD - Signal

Each histogram column is compared with the previous one. If it is higher, it counts as rising: dark green above zero, light red below. If it is not higher, it counts as falling: light green above zero, dark red below.

Warm-up compounds. The 26-bar average has its first value on bar 25 counting from 0, so the MACD line starts there. The signal line needs nine MACD values rather than nine bars, so the signal and histogram start on bar 33, eight bars after the MACD line. Each exponential average is started from the simple average of its first values.

Limitations

  • It lags. All three lines are built from averages of past prices, so crossings arrive after the move has started.
  • Sideways markets produce repeated false crossings. When price ranges, MACD sits near zero and crosses its signal line again and again.
  • It is in price units. A MACD of 50 means something different on BTC than on a coin priced in cents. The Price Oscillator expresses the same gap as a percentage.
  • The live candle moves. The current bar's line, signal and histogram change until that bar closes, and so can its column colour.
  • It is not a strategy. On its own it carries no risk management, sizing or exit.

Frequently asked questions

MACD, moving average convergence divergence, is the difference between a fast and a slow exponential average of price. It is drawn with a signal line, which is an average of MACD itself, and a histogram of the gap between the two, in a separate pane under the chart.

The MACD line above zero means the fast average is above the slow one; below zero, the reverse. Crossings of the signal line show the gap between the averages starting to widen or narrow, and the histogram shows the same thing as columns, with a lighter shade when a column is shrinking. Treat these as context and confirm them with price.

Yes. The indicator declares four inputs: Fast Length, default 12; Slow Length, default 26; Signal Smoothing, default 9, each with a minimum of 1; and Source, default close. Open the indicator's settings on the chart to change them.

Values on bars that have already closed are not revised. The current candle's MACD, signal and histogram move while that candle is live and settle when it closes. Because the exponential averages need a starting point, scrolling back to load older history recalculates them and values near the very start of the loaded range can shift.

The signal line is an average of MACD values, so it cannot begin until there are nine of them. With the defaults the MACD line starts on bar 25 and the signal line and histogram on bar 33.

Use the Add to chart button at the top of this page. It opens BTC/USDT on Binance in the Altrady Charts terminal with the built-in MACD already applied. On any other market, open the indicator picker on the chart and choose MACD from the Momentum group.

Add to chart