How to Trade the MACD Divergence

Moving average convergence divergence (MACD), invented in 1979 by Gerald Appel, is one of the most popular technical indicators in trading. The MACD is appreciated by traders the world over for its simplicity and flexibility, as it can be used either as a trend or momentum indicator.

Trading divergence is a popular way to use the MACD histogram, using a divergence signal as a forecasting tool is questionable. A divergence trade is not as accurate as it appears in hindsight because past data will only include successful divergence signals. A visual inspection of past chart data won’t reveal the failed divergences because they no longer appear as a divergence.  

Key Takeaways

  • Moving Average Convergence Divergence (MACD) is a trend-following momentum indicator that shows the relationship between two moving averages of a security’s price. 
  • Traders use the MACD to identify when bullish or bearish momentum is high in order to identify entry and exit points for trades.
  • MACD is used by technical traders in stocks, bonds, commodities, and FX markets.
  • Here we give an overview of how to use the MACD indicator.

MACD: An Overview

The concept behind the MACD is fairly straightforward. Essentially, it calculates the difference between an instrument's 26-day and 12-day exponential moving averages (EMA). Of the two moving averages that make up the MACD, the 12-day EMA is the faster one, while the 26-day is slower.

In the calculation of their values, both moving averages use the closing prices of whatever period is measured. On the MACD chart, a nine-day EMA of the MACD itself is plotted as well, and it acts as a trigger for buy and sell decisions. The MACD generates a bullish signal when it moves above its own nine-day EMA, and it sends a sell sign when it moves below its nine-day EMA.

The MACD histogram is an elegant visual representation of the difference between the MACD and its nine-day EMA. The histogram is positive when the MACD is above its nine-day EMA and negative when the MACD is below its nine-day EMA. If prices are rising, the histogram grows larger as the speed of the price movement accelerates, and contracts as price movement decelerates. The same principle works in reverse as prices are falling.

The chart below is a good example of a MACD histogram in action:

MACD histogram. As price action (top part of the screen) accelerates to the downside, the MACD histogram (in the lower part of the screen) makes new lows. Image by Sabrina Jiang © Investopedia 2020

The MACD histogram is the main reason why so many traders rely on this indicator to measure momentum because it responds to the speed of price movement. Indeed, most traders use the MACD indicator more frequently to gauge the strength of the price move than to determine the direction of a trend.

Trading Divergence

As we mentioned earlier, trading divergence is a classic way in which the MACD histogram is used. One of the most common setups is to find chart points at which price makes a new swing high or a new swing low, but the MACD histogram does not, indicating a divergence between price and momentum.

The chart below illustrates a typical divergence trade:

A typical (negative) divergence trade using a MACD histogram. The price movements make a new swing high, but the MACD histogram is unable to exceed its previous high of 0.3307. (The histogram reached this high.) The divergence is a signal that the price is about to reverse at the new high and, as such, it is a signal for the trader to enter into a short position. Image by Sabrina Jiang © Investopedia 2020

Using a divergence signal as a forecasting tool is questionable. A divergence trade is not as accurate as it appears in hindsight because past data will only include successful divergence signals. A visual inspection of past chart data won’t reveal the failed divergences because they no longer appear as a divergence.  

Prices frequently burst higher, or lower, as market makers trigger stops to match the supply and demand in the order flow.  The chart below demonstrates a typical divergence fakeout, which has frustrated scores of traders over the years:

A typical divergence fakeout. Strong divergence is illustrated at the bottom of the chart by the vertical line, but traders who set their stops at swing highs would have been taken out of the trade before it turned in their direction. Image by Sabrina Jiang © Investopedia 2020 

One of the reasons traders often lose with this setup is that they enter a trade on a signal from the MACD indicator but exit it based on the move in price. Since the MACD histogram is a derivative of price and is not price itself, this approach is, in effect, the trading version of mixing apples and oranges.

Using the MACD Histogram for Both Entry and Exit

To resolve the inconsistency between entry and exit, a trader can use the MACD histogram for both trade entry and trade exit signals. To do, so a trader may take a partial short position the entry. The trader then would exit the trade only if the high of the MACD histogram exceeds its previous swing high. If, on the other hand, the MACD histogram does not generate a new swing high, the trader then adds to their initial position, continually achieving a higher average price for the short.

Currency traders are uniquely positioned to take advantage of this strategy, because the larger the position, the larger the potential gains once the price reverses. In the forex (FX) market, you can implement this strategy with any size of the position and not have to worry about influencing price. (Traders can execute transactions as large as 100,000 units or as little as 1,000 units for the same typical spread of 3-5 points in the major pairs.)

In effect, this strategy requires a trader to average up as prices temporarily move against them. This is typically not considered a good strategy. Many trading books have derisively dubbed such a technique as "adding to your losers."

However, in this case, the trader has a logical reason for doing so: The MACD histogram has shown divergence, which indicates that momentum is waning and price may soon turn. In effect, the trader is trying to call the bluff between the seeming strength of immediate price action and the MACD readings that hint at weakness ahead. Still, a well-prepared trader using the advantages of fixed costs in FX, by properly averaging up the trade, can withstand the temporary drawdowns until price turns in their favor.

The chart below illustrates this strategy in action:

The chart indicates where price makes successive highs but the MACD histogram does not - foreshadowing the decline that eventually comes. By averaging up his or her short, the trader eventually earns a handsome profit, as we see the price making a sustained reversal after the final point of divergence. Image by Sabrina Jiang © Investopedia 2020 

The Bottom Line

Like life, trading is rarely black and white. Some rules that traders agree on blindly, such as never adding to a loser, can be successfully broken to achieve extraordinary profits. However, a logical, methodical approach for violating these important money management rules needs to be established before attempting to capture gains. In the case of the MACD histogram, trading the indicator instead of the price offers a new way to trade an old idea: divergence. Applying this method to the FX market, which allows effortless scaling up of positions, makes this idea even more intriguing to day traders and position traders alike.

Article Sources

Investopedia requires writers to use primary sources to support their work. These include white papers, government data, original reporting, and interviews with industry experts. We also reference original research from other reputable publishers where appropriate. You can learn more about the standards we follow in producing accurate, unbiased content in our editorial policy.
  1. CMT Associates. "Gerald Appel." Accessed Jan. 14, 2022.

  2. Corporate Finance Institute. "MACD Oscillator – Technical Analysis." Accessed Jan. 14, 2022.