The MACD indicator (Moving Average Convergence Divergence) is a momentum and trend-following indicator that is based on the information of moving averages. It is developed by Gerald Appel in the late seventies. The MACD oscillator is one of the simplest and most effective momentum indicators available. The Moving Average Convergence/Divergence (MACD) indicator is a momentum oscillator primarily used to trade trends. It is also an oscillator, it is not typically used to identify overbought or oversold conditions. The MACD appears on the chart as two lines which oscillate without boundaries.
MACD indicator strategy / MACD formula helps one to understand immediate direction of the underlying. It is known as Moving Average Convergence Divergence which is abbreviated as MACD. The MACD indicator strategy was developed by Gerald Appel, publisher of Systems and Forecasts.
What is MACD Indicator?
- It is a Trend following momentum indicator
- It shows relationship between two moving average of prices.
- MACD is the difference between a 26 day EMA (exponential moving average) and 12 day EMA
- A 9 day EMA, called signal line is plotted on top of MACD to show buy/ sell opportunities.
The indicator can be easily attached to a chart in Zerodha Kite from the STUDIES section. Watch the image above to check how the indicator is attached on HDFC share price chart. By default the parameters are 12-26-9, but you can test other versions of MACD like 3-1016 as described by Corey Rosenbloom in his 3-10 oscillator etc.
MACD Formula / Calculation
MACD can be calculated by subtracting the value of a 26 period EMA (Exponential Moving Average) from a 12 period EMA. The shorter EMA (Exponential Moving Average) is constantly converging toward, and diverging away from the longer EMA. The signal line is created with a 9 period EMA (Exponential Moving Average) of the MACD line.
How does MACD work?
- There are three popular ways to use MACD – Crossover, overbought/ oversold condition, divergence
- MACD proves most effective in wide swinging trading market
- The signal shows effectively when to take a buy position and when to take a sell position
These signals are provided by the MACD indicator:
- Moving Average cross –
This is the most important signal of the moving average convergence divergence is when the faster MA (Moving Average) breaks the slower one. In the traders often use this signal to enter new trades.
- Divergence –
MACD (Moving Average Convergence Divergence) also gives divergence signals. For example, if a trader sees the price increasing and the indicator recording lower tops or bottoms, then trader have a bearish divergence. The trader has a bullish divergence when the price drops and the moving average convergence divergence produces higher tops or bottoms.
- Distance between MAs (overbought/oversold) –
The MACD indicator has no limit. So, many traders do not think of using the tool as an overbought/oversold indicator. When a stock has entered an overbought/oversold territory, then a large distance between the fast and slow lines of the indicator. The easiest way to identify this divergence is by looking at the height of the histograms on the chart. In this indicator, this divergence often leads to sharp rallies counter to the primary trend. These signals are visible on the chart as the cross made by the fast line will look like a teacup formation on the indicator.
A basic trading rule is that sell the stock when the MACD falls below its signal line. Similarly one buys the stock when MACD rises above signal line. Another popular method is that a trader buys when MACD goes above zero and sell when MACD goes below zero.
Overbought/ Oversold conditions –
When the shorter exponential moving average pulls away from longer moving average, i.e. the MACD rises, it is very likely that the security is overextending its position and will soon return to more realistic levels. This overbought/ oversold condition varies from security to security.
An indication that the current trend is going to end and a reversal may take place occurs when the MACD diverges from stock price. Or it can be said when the MACD pulls away from trend shown by the price of the security. A bearish divergence occurs when MACD makes new lows the stock price fails to make new lows. A bullish divergence occurs when MACD makes new highs but the price doesn’t. These divergences are more significant when they occur at relatively overbought/ oversold levels.
MACD indicator strategy works best if it is combined with Williams Percent R. A combined study of these two makes trading more successful.