1. Applying The MACD Indicator With MetaTrader 4: Introduction
  2. Applying The MACD Indicator With MetaTrader 4: Moving Average Convergence Divergence
  3. Applying The MACD Indicator With MetaTrader 4: Using The MACD
  4. Applying The MACD Indicator With MetaTrader 4: Customizing The MACD
  5. Applying The MACD Indicator With MetaTrader 4: Editing and Deleting The MACD
  6. Applying The MACD Indicator With MetaTrader 4: Conclusion

The moving average convergence divergence, commonly called the MACD or "Mac D," is a technical indicator developed by Gerald Appel in 1979. Shown in Figure 1, the MACD is a popular and versatile tool used to recognize and follow strong trends, and to spot trend reversals.

A MACD applied to a 4-hour chart of the GBPUSD currency pair.
Figure 1: A MACD applied to a four-hour chart of the GBP/USD currency pair.


The MACD is based on the difference between two moving averages (MAs): a faster one (to reflect shorter-term market trends) minus a slower one (to reflect longer-term trends). Typically, a 12-period exponential moving average (the faster MA) is paired with a 26-period exponential moving average (the slower MA); both moving averages use closing prices for calculations. Other MA lengths can be used, such as a 19-period exponential moving average (EMA) paired with a 39-period EMA, or an 8-period EMA paired with a 17-period EMA. The examples in this tutorial will reflect the 12-26 period MACD, as it is one of the most widely used. The 12-26 period MACD is calculated as:

MACD = 12-period EMA minus 26-period EMA


In 1986, Thomas Aspray added a histogram (a series of vertical lines, shown in Figure 1 in dark blue) to the MACD indicator. The histogram is positive (above the zero line) when the MACD (12-period EMA minus the 26-period EMA) is above its 9-period EMA; it is negative (below the zero line) when the MACD is below its 9-period EMA. The histogram grows larger as the speed of price movement accelerates. Conversely, as price movement slows down, the histogram contracts. The histogram actually represents the difference (or divergence) between the MACD and the signal line (the bright pink curving line in Figure 1):

Histogram = MACD minus Signal


The signal line is a 9-period EMA of the MACD itself that is plotted on top of the MACD:

Signal = 9-period EMA of MACD

Some traders use this "signal line" as a trigger for buy and sell signals: for example, a buy signal may exist when the MACD moves above its own 9-period EMA, and a sell signal might occur when the MACD moves below its 9-period EMA, as shown in Figure 2. Because the MACD is such a versatile tool with a variety of possible uses, traders may wish to research the many other possible interpretations.

One interpretation of the MACD: sell as the histogram drops below the signal line, and buy when the histogram rises above the signal line.
Figure 2: One interpretation of the MACD: sell as the histogram drops below the signal line, and buy when the histogram rises above the signal line.


The name of an indicator appears at the top of the price chart to which the indicator is attached. When the MACD indicator is applied to a price chart, "MACD" appears at the top and its EMA lengths appear in parentheses next to its name. Each EMA length is separated by a comma, as shown in Figure 3. For example, the 12-26 MACD with a 9-period EMA signal line will appear as MACD (12, 26, 9).

The name of an indicator appears at the top of the chart to which the indicator is attached.
Figure 3: The name of an indicator appears at the top of the chart to which the indicator is attached. Here, MACD is shown with its settings in parentheses (12, 26, 9).



Applying The MACD Indicator With MetaTrader 4: Using The MACD
Related Articles
  1. Trading

    Trading The MACD Divergence

    Currency traders can use this method to avoid stop-order triggers before the real reversal.
  2. Trading

    A Primer On The MACD

    Learn to trade in the direction of short-term momentum.
  3. Trading

    MACD And Stochastic: A Double-Cross Strategy

    Two indicators are usually better than one. Find out how this pairing can enhance your trading.
  4. Trading

    Bearish MACD Crossovers With A Positive Twist

    These stocks are exhibiting bearish crossovers in their MACD readings, indicating potential short-term weakness, but also longer-term buying opportunities.
  5. Trading

    Candle Sheds More Light Than the MACD

    Read the case against this well-established indicator.
  6. Trading

    4 Stocks With Bullish MACD Crossovers

    These four stocks recently created a bullish MACD crossover, signaling the potential end of the pullback and the start of the next up-trending wave.
  7. Trading

    Measuring Stock Market Sentiment With Extreme Indicators

    Pay attention to how the exhaustion principle helps technical indicators signal trend reversals when abrupt value changes coincide with high trading volume.
  8. Investing

    5 Stocks With Bullish MACD Crossovers for 2016 (COT, OCLR)

    Take a technical analysis look at five stocks that may be heading to the upside in 2016, based on a bullish MACD crossover buy signal.
Frequently Asked Questions
  1. What are the Differences Between Ex Works (EXW) and Free On Board (FOB)?

    Learn about Ex Works and Free on Board, the main difference between these Incoterms, and the responsibilities of buyers and ...
  2. What are Common Examples of Monopolistic Markets?

    Discover what causes real instances of market monopoly, how it persists and where monopoly privilege is most common in the ...
  3. What is the gold standard?

    The gold standard is a monetary system where a country's currency or paper money has a value directly linked to gold, but ...
  4. What's the most expensive stock of all time?

    The most expensive publicly traded stock of all time is Warren Buffett’s Berkshire Hathaway.
Trading Center