|MACD (Moving Average Convergence Divergence) Calculation|
|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. Closing prices are used for these moving averages. A 9-day EMA of the MACD Line is plotted with the indicator to act as a signal line and identify turns. The MACD Histogram represents the difference between MACD and its 9-day EMA, the Signal line. The histogram is positive when the MACD Line is above its Signal line and negative when the MACD Line is below its Signal line.
The values of 12, 26 and 9 are the typical setting used with the MACD, however other values can be substituted depending on your trading style.
Where to get MACD for metarader
Macd is a free tool in Metatrader and is found through the navigator in indicators. Simple drag and drop on the chart.
Historically, the MACD was invented by Gerald Appel in the 1970s. Later, Thomas Aspray added a histogram to the MACD in 1986, as a means to anticipate MACD crossovers, an indicator of important moves in the underlying security.
Today, MACD is a common indicator in Metatrader and other trading platforms. MACD is often the basis of other advanced indicators and trading systems.
The graph above shows a stock with a MACD indicator underneath it. The indicator shows a blue line, a red line, and a histogram or bar chart which calculates the difference between the two lines. Values are calculated from the price of the stock in the main part of the graph.
The period for the moving averages on which an MACD is based can vary, but the most commonly used parameters involve a faster EMA of 12 days, a slower EMA of 26 days, and the signal line as a 9 day EMA of the difference between the two. It is written in the form, MACD (faster, slower, signal) or in this case, MACD(12,26,9).
Exponential moving averages highlight recent changes in a stock's price. By comparing EMAs of different lengths, the MACD line gauges changes in the trend of a stock. By then comparing differences in the change of that line to an average, an analyst can identify subtle shifts in the strength and direction of a stock's trend.
Traders recognize three meaningful signals generated by the MACD indicator.
**the MACD line crosses the signal line
**the MACD line crosses zero
**there is a divergence between the MACD line and the price of the stock or between the histogram and the price of the stock
Graphically this corresponds to:
the blue line crossing the red line
the blue line crossing the x-axis (the straight black line in the middle of the indicator)
higher highs (lower lows) on the price graph but not on the blue line, or higher highs (lower lows) on the price graph but not on the bar graph
Signal–line crossovers are the primary cues provided by the MACD. The standard interpretation is to buy when the MACD line crosses up through the signal line, or sell when it crosses down through the signal line.
The upwards move is called a bullish crossover and the downwards move a bearish crossover. Respectively, they indicate that the trend in the stock is about to accelerate in the direction of the crossover.
The histogram shows when a crossing occurs. Since the histogram is the difference between the MACD line and the signal line, when they cross there is no difference between them.
The histogram can also help in visualizing when the two lines are approaching a crossover. Though it may show a difference, the changing size of the difference can indicate the acceleration of a trend. A narrowing histogram suggests a crossover may be approaching, and a widening histogram suggests that an ongoing trend is likely to get even stronger.
While it is theoretically possible for a trend to increase indefinitely, under normal circumstances, even stocks moving drastically will eventually slow down, lest they go up to infinity or down to nothing.
A crossing of the MACD line through zero happens when there is no difference between the fast and slow EMAs. A move from positive to negative is bearish and from negative to positive, bullish. Zero crossovers provide evidence of a change in the direction of a trend but less confirmation of its momentum than a signal line crossover.
The third cue, divergence, refers to a discrepancy between the MACD line and the graph of the stock price. Positive divergence between the MACD and price arises when price hits a new low, but the MACD doesn't. This is interpreted as bullish, suggesting the downtrend may be nearly over. Negative divergence is when the stock price hits a new high but the MACD does not. This is interpreted as bearish, suggesting that recent price increases will not continue.
Divergence may also occur between the stock price and the histogram. If new high price levels are not confirmed by new high histogram levels, it is considered bearish; alternatively, if new low price levels are not confirmed by new low histogram levels, it is considered bullish.
Longer and sharper divergences—distinct peaks or troughs—are regarded as more significant than small, shallow patterns.
The MACD is only as useful as the context in which it is applied. An analyst might apply the MACD to a weekly scale before looking at a daily scale, in order to avoid making short term trades against the direction of the intermediate trend. Analysts will also vary the parameters of the MACD to track trends of varying duration. One popular short-term set-up, for example, is the (5,35,5).
Like any indicator, the MACD can generate false signals. A false positive, for example, would be a bullish crossover followed by a sudden decline in a stock. A false negative would be a situation where there was no bullish crossover, yet the stock accelerated suddenly upwards.
A filter can be applied to the signal line crossovers to ensure that they will hold. An example of a price filter would be to buy if the MACD line breaks above the signal line and then remains above it for three days. As with any filtering strategy, this reduces the probability of false signals but increases the frequency of missed profit.
Analysts use a variety of approaches to filter out false signals and confirm true ones.
By Neal Vanderstelt
Forex Trader, Market Analyst, Trading System Designer
Please rate, recommend, and comment below: