The MACD indicator marries momentum and trend into one indicator. The moving average convergence/divergence (MACD) is a technical indicator of momentum that uses moving averages to determine a trend’s strength.

Technical indicators use formulas to generate data points and analyze price action. Investors use indicators for trading alerts, to confirm other indicators, forecast prices, and guide entry and exit decisions.

## MACD Indicator (Moving Average Convergence Divergence) Explained

The moving average convergence/divergence (MACD) is a technical indicator of momentum that uses moving averages to determine a trend’s strength.

The MACD uses three exponential moving averages (a short term, a long term, and the average difference between the short and long term) to show price momentum.

The MACD indicates changes in trend direction by showing the turning points where the signal line crosses over the other moving average lines.

MACD is often used in mean-reversion systems to signal overbought or oversold conditions.

The default parameters for most MACD calculations take the difference between a 12-period EMA and a 26-period EMA to create an oscillator around zero. MACD is known as a “centered-oscillator” because a cross above or below the zero centerline signals a change in momentum.

Most MACD charts show the MACD line, the signal line, and a histogram of the difference between the MACD line and the signal line.

The MACD can be calculated on any timeframe from intraday, daily, weekly, or other data points. Values above zero are typically bullish and indicate an uptrend, while MACD values below zero indicate a downtrend.

## How is MACD calculated?

The default 12, 26, and 9 settings of the MACD can be adjusted to create more or fewer signals from the indicator. Shorter values generate more signals, while longer values create fewer signals. The “MACD line” is the difference between the 12 and 26-period EMAs.

The “signal line” is a nine-period EMA of the MACD line.

The MACD line moves faster than the signal line because the signal line is an EMA of the MACD line.

Adjusting the number of periods in the EMA calculations changes the MACD’s speed of responsiveness to price changes. Reducing the responsiveness of the MACD line gives fewer signals, which can reduce whipsaws but comes at the expense of quicker entry and exit signals.

## MACD histogram

The MACD may be displayed as a line chart or a histogram. The MACD histogram visually displays the same information as MACD and signal line crossovers.

Because the two display types relay the same information, traders tend to select one or the other as a matter of preference.

A MACD histogram’s vertical bars above and below the zero centerline visually indicate positive and negative momentum. Crosses above and below the centerline represent the same information as positive and negative crosses of the signal line on a MACD line chart.

Aside from analyzing crossovers, the MACD histogram is often weighted more heavily in analysis than the signal line because peaks and troughs in the histogram occur less frequently than the signal line’s crosses of 0. Downward or upward turns in the MACD histogram towards the zero line always precede MACD crossover signals.

## MACD crossovers

The MACD is a variation of a traditional moving average crossover signal. A cross of the MACD’s zero line is the same signal as a chart with two exponential moving averages. The MACD is useful because when the MACD is above zero, the underlying security is in an uptrend.

MACD buy and sell signals are given when the MACD line and signal lines cross. In this way, MACD resembles the two-moving average crossover system. The MACD histogram’s distance above or below the zero line is where MACD resembles an oscillator.

Traders may draw trendlines on the MACD chart to demonstrate peaks and troughs in MACD momentum.

## MACD entries and exits

A positive MACD indicates upward momentum and means the average price of the last 12 periods is higher than the average price of the previous 26 periods. A negative MACD shows downward momentum as the average price of the last 12 periods is lower than the average price of the last 26 periods.

MACD buy signals happen when the MACD crosses from below to above the signal line. The highest quality signals often occur when the MACD line is far below zero when the crossover occurs.

MACD sell signals occur when the MACD crosses from above to below the signal line. The highest quality signals often occur when the MACD line is far above zero when the bearish crossover occurs.

## Trading MACD divergences

Divergence simply means an indicator and price chart are moving in different directions.

Traders compare peaks and valleys in the MACD to peaks and valleys in the underlying security’s price to find divergences.

When you compare peaks and troughs in the MACD lines to the price chart of the underlying security, you can determine convergence and divergence.

Divergences between a price chart and the MACD mean the two are moving in opposite directions. Convergence between the two means momentum and price action are in sync.

For example, if a security’s price makes a new high but MACD does not, then the two are diverging, with MACD indicating decreasing momentum in the security’s upward movement. This bearish divergence is a contrarian indicator.

A double top is often accompanied by a bearish divergence in momentum. The MACD’s slowing momentum as price makes the second high foreshadows the subsequent price decline. Bullish divergences indicate a long entry opportunity.

Because the indicator measures momentum, analysts believe the price action will follow the momentum. So, divergences between momentum and price can be significant.

## Using the MACD with other indicators

Using only the MACD signal line for entry and exit indicators can be noisy and give false signals. Traders often pair the MACD with other indicators to seek confirmation before executing trading signals.

For example, turns in the MACD signal line near areas of support or resistance confirm potential reversal areas. Or, pairing the MACD with the Money Flow Index (MFI) confirms price momentum with an increase in volume.

Whereas RSI is bounded between 0 and 100, the MACD is unbounded, making it more useful in trending markets than for identifying overbought and oversold conditions.

The MACD can be used in multiple timeframe analysis. For example, traders may use the MACD on an hourly chart for early trade signals on a daily timeframe. In this instance, the shorter timeframe MACD triggers buy and sell signals for the daily timeframe.

You can even use MACD in your automated trading strategies with this decision recipe.

Check out this MACD Indicator Bounce bot workshop to learn more about automating a simple MACD strategy.