Charts and indicatorsUpdated 2 min readBy the FXNOD team

MACD indicator explained: lines, histogram and signals

MACD, the Moving Average Convergence Divergence, is the difference between a 12-period and a 26-period exponential moving average. A 9-period average of that difference is the signal line, and the histogram shows the gap between the two. MACD above zero means the faster average is above the slower one: momentum is up. It lags the price.

The three parts

PartFormulaShows
MACD line12-period EMA minus 26-period EMADirection and strength of momentum
Signal line9-period EMA of the MACD lineA smoothed MACD to compare against
HistogramMACD line minus signal lineWhether momentum is building or fading

The signals people use

  • Signal-line cross: MACD crossing above the signal line is read as bullish, below as bearish.
  • Zero-line cross: MACD crossing above zero means the 12 EMA has crossed above the 26 EMA.
  • Histogram: bars shrinking towards zero show a move losing strength before the lines cross.
  • Divergence: the price makes a new high and MACD does not.

Settings

The standard is 12, 26 and 9. Shorter settings react faster and give more false signals. There are no best settings: tuning them until the past looks perfect is curve fitting.

Where it fails

  • Sideways markets: the lines cross back and forth around zero and every cross loses.
  • Lag: it is built from averages of averages, so it confirms a move after part of it has gone.
  • Divergence can persist through a long trend before anything turns.
  • Its values are in price units, so they cannot be compared between markets.

Using it well

Treat MACD as a description of momentum, combined with trend and levels. Decide whether the market is trending first: MACD crossovers suit trends and should be ignored in a range. On a synthetic index the lines calculate correctly and say nothing about the next move.

In FXNOD

MACD is one of the indicators a Bot Forge bot can use to decide which side to take. An indicator needs enough candles before it has a value, so the bot waits for one.

Questions people ask

What does MACD stand for?
Moving Average Convergence Divergence: it measures how two moving averages come together and move apart.
What are the best MACD settings?
The default 12, 26, 9 is the most widely used. Other settings trade speed against false signals; none is best.
Is MACD a leading indicator?
No. It is calculated from past prices and lags them.

Put it on a chart

Trade Pilot's chart has moving averages, RSI and Bollinger Bands, and a bot in Bot Forge can use indicators to choose its side. Try both on your Deriv demo account.

Get started