On a trading chart, the moving average convergence-divergence indicator (MACD) was designed use exponential moving averages of 26 and 12 days, although the MACD is a model into which you can insert any moving average that suits your fancy and backtests well on your security.
A full MACD indicator, as shown in this figure, includes
An indicator line
A trigger (usually a moving average of the indicator, superimposed on top of the indicator)
The arrows in this figure show where you would buy and sell:
Buy: In the MACD indicator window, the crossover of the trigger and the MACD indicator occurs earlier than the crossover of the two moving averages in the top window. Looking from the left, the MACD tells you to buy two days earlier than the moving average crossover.
Sell: The real benefit comes at the next signal — the exit. Here, the MACD tells you to sell over two weeks ahead of the moving average crossover, saving you $4.68, or almost 5 percent.
Reenter: At the right-hand side of the chart, the MACD tells you to reenter, while the moving averages are still lollygagging along and haven’t yet crossed.
The MACD’s forecasting ability makes it one of the most popular indicators. But watch out for attributing too much to it. A shock can come along and cause the price to vary wildly from the trend, whereupon the tendency to converge or diverge
becomes irrelevant. A new price configuration develops, and because the MACD is comprised of moving averages, the indicator still lags the price event like any other moving average.
You may find it hard to read the MACD indicator, except when the trigger is actually crossing the indicator line. You’re not alone. Another way of displaying the MACD, in histogram format, is much easier on the eye.
In this figure, each bar in the histogram represents the difference between the two moving averages on that date. You don’t use the trigger line in the histogram because you can choose by eye how fast the histogram bars are closing in on the zero line, or diverging from it:
At zero: The two moving averages have the same numerical value — they have zero difference between them.
While the bars grow taller: The difference between the two averages is increasing (divergence), and this movement favors the trend continuing.
When the bars stop growing and start to shrink: The two moving averages are converging — watch out for a signal change.
When the bars are upside down (below zero), the signal is to sell. What do you do when the bars become less negative? This indicator means selling pressure (supply) is running out of steam. Technically, you don’t get a buy signal until the bars are actually over the zero line, but it’s up to you whether to act in anticipation that it will cross the line.