Read Comments (3)

Moving averages are some of most simple technical indicators investors use. While their simplicity makes them very popular, they do suffer from one drawback—they are trend-following indicators that work best during strong trending periods. During sideways or choppy markets, moving averages tend to generate false signals and are prone to “whipsaws,” where buy or sell signals are reversed in a short time.

To overcome this, technicians use an indicator called the oscillator, which is more sensitive, and thus more responsive, to this kind of market activity. Oscillators may be used to determine overbought or oversold conditions as well as whether there is a divergence between price and the indicator.

One indicator combines the trend-following characteristics of moving averages with oscillator characteristics that help indicate whether a security is overbought or oversold and help pinpoint possible divergences. The indicator is called moving average convergence-divergence, or MACD.

Developed by Gerald Appel in the late1970s, MACD turns two trend-following moving averages into a momentum oscillator by deducting the longer-period moving average from the shorter-period one. Specifically, the MACD is commonly calculated as follows:

MACD Line = 12-day EMA – 26-day EMA

Signal Line = 9-day EMA of MACD Line

MACD Histogram = MACD Line – Signal Line

The MACD line is the 12-day exponential moving average (EMA) less the 26-day EMA. Typically closing prices are used. Exponential moving averages are similar to simple moving averages, except that more weight is given to the latest data. As a result, this type of moving average reacts faster to recent price changes than a simple moving average. For more information on exponential moving averages, see the Spreadsheet Corner article from the Third Quarter 2010 issue of CI, available at www.computerizedinvesting.com.

The signal line is a nine-day EMA of the MACD line and is plotted along with the MACD line on a chart. It is the interaction between these two lines—crossovers and divergences—that traders look for.

Lastly, the MACD histogram measures the difference between the MACD line and the signal line. It is positive when the MACD line is above the signal line and negative when the signal line is above the MACD Line.

The 12-, 26- and nine-day settings are the typical settings used for the MACD. However, you can adjust the lengths to fit your trading style. Furthermore, you can use the MACD with daily, weekly or monthly charts.

As implied by its name, the MACD is concerned with the convergence and divergence of the two exponential moving averages. Convergences occur when the two lines move toward each other, while divergences take place when the two moving averages move away from each other. The MACD line oscillates above and below the “zero” line or centerline. The MACD is above the centerline whenever the 12-day EMA is above the 26-day EMA. Crossovers above or below the centerline take place when the 12- and 26-day EMAs cross. A rising MACD line means the 12-day EMA is diverging further from the 26-day EMA, which indicates rising upside momentum. The MACD falls as the 12-day EMA diverges further below the 26-day EMA. This indicates that downside momentum is increasing.

Figure 1, which is a chart of Terra Nitrogen Co. (TNH) from StockCharts.com, shows the interaction between the moving averages and their impact in the MACD.

The yellow shaded area depicts when the MACD line is negative, or when the 12-day EMA is below the 26-day EMA. The MACD line became negative in September 2011, as indicated by the black “cross” arrow in the lower pane. As the 12-day EMA fell further below the 26-day EMA, the MACD line fell deeper into negative territory. In October 2011, the 12-day EMA rose above the 26-day EMA, which resulted in the crossover of the MACD line into positive territory (the orange shaded area).

In this installment of Technically Speaking, we began a discussion of the moving average convergence-divergence indicator. It takes a simple trend-following indicator—the moving average—and turns it into a momentum oscillator.

In the 2012 Third Quarter issue of Computerized Investing, we will expand on this discussion to cover how traders might use the MACD.

→ CI Staff .

** Rick** from MO posted over 3 years ago:

I have noticed that positive divergence between 2/3 bottoms of MACD histogram to those of price ( where the recent bottoms of MACD are progressive higher while the recent bottoms of price are either lower or at the same level) can predict a strong upward move in price. I have ued these kinds of positive divrgences to buy stock with 75% success. Thanks

** Paul** from MA posted over 3 years ago:

To Rick....interesting observation but I'm not clear on what you mean by "2/3 bottoms". how do you know you're at 2/3rds of the bottom w/o knowing what the bottom is? does oservation only apply to right side of histogram w/ assumption it's on the rise to above zero?

this is a well written article, as is the earlier referenced one and

i look forward to the nxt intallment

** James** from CO posted over 3 years ago:

Excellent well-written article. MACD has been lauded by many successful traders AND investors as one of the most consistent tools that has proven highly reliable since its inception in the late 70s. Anyone using moving averages would be wise to read this and all the "to be continued" articles on MACD that follow.

Sorry, you cannot add comments while on a mobile device or while printing.