What is MACD indicator

The MACD is one of the most popular technical indicators. It is included into most trading platforms for financial and commodity markets.

Gerald Appel

The indicator was created almost 40 years ago by Gerald Appel. It was first used in 1979. MACD is an abbreviation of the phrase Moving Average Convergence/Divergence.

The indicator is used in technical analysis. It helps determine the direction of the trend, its strength and duration; price range, reversal levels; it also gives trading signals.

This indicator is called a trend indicator because it is formed on the basis of two Moving Averages. They are not visible on the chart, only their values are used in calculations. The indications of the MACD are displayed in a separate window under the chart. Practically, we have a trend oscillator. A classical MACD chart is a histogram with vertical bars and an additional smoothing line. The histogram represents the space between the Moving Averages and the dynamics of their convergence or divergence. When the space between the Averages grows, the bars of the histogram also become longer. If the space becomes smaller, the bars shorten. When they line up above the zero line and grow longer, the price is considered to grow. When the bars of the histogram gather below zero and grow shorter, the price is expected to drop.

The MACD is a lagging indicator by its nature as it receives initial data from the quick (period 12) and slow (period 26) Exponential Moving Averages (EMA). The third component of the indicator is the Simple Moving Average (SMA) with the smoothing period 9. As long as the price is primary and the Averages are secondary, all of them are lagging behind the price. The SMA determines the trend by its position in relation to the central zero line. When the SMA is above the zero line, it signals an ascending trend; when it is below, the trend is descending. The SMA is also called a signal line and used for additional confirmation of trading signals.

MACD indicator
MACD indicator

MACD fans have recently improved the indicator, so that nowadays lots of versions are available on the Internet, including colored ones.

MACD settings

Fast EMA is calculated as the average price during a set period (9 candlesticks by default).

Slow EMA also represents an average price but during a longer period, which is reflected in its name.

The difference between the quick and slow EMAs is shown by histograms, each of them having a separate meaning; MACD SMA is calculated as the average value of the histograms during a set period of time (by default, the smoothing period is 9).

The setting "Apply to:" is used with the input data for the MACD. For example, the default value is "Close"; this means that the quick EMA will be calculated on the basis of the closing price of the candlesticks. If the setting is changed for "Open", the opening price will be used. The indicator features 7 basic parameters for calculating an average price:

  1. Close
  2. Open
  3. High
  4. Low
  5. Median Price, calculated as (High + Low) / 2
  6. Typical Price, calculated as (High + Low + Close) / 3
  7. Weighted Close, calculated as (High + Low + 2*Close) / 4
MACD settings
MACD settings

MACD results are based on quick and slow EMA settings. If the period is too short, the indicator becomes too sensitive to the price fluctuations and starts giving lots of false signals. If the period is too long, the indicator becomes slower, which makes the signals more accurate but more scarce. The standard MACD settings are most spread ones on the market (12/26/9).

MACD parameters on the chart

MACD parameters
MACD parameters

Convergence and divergence

As the name of MACD (Moving Average Convergence/Divergence) states, the function of the indicator is primarily detecting convergence and divergence on charts. They are not just important elements of technical analysis but also rather strong signals of trend reversals. Convergence and divergence occur when price dynamics is not supported by increase of supply or demand, in other words, the trend weakens.

Divergence and convergence are derived from the Latin words "divergere" (deviation, discrepancy) and "convergo" (closing on). But what is diverging/converging and where? In our case we are looking at the difference between the price chart and the indicator (oscillator) chart.

  • Divergence is a bearish signal that appears in the presence of an ascending trend, when the price on the chart takes new highs while the MACD, conversely, shows lower peaks.
  • Convergence is a bullish signal that appears in the presence of a descending trend when the price chart demonstrates new lows while minimal values on the indicator stay the same or grow.

Types of convergence and divergence

Divergences and convergences can be of two types: classic and hidden.

Classic divergences and convergences are the most popular instruments of technical analysis in the practice of trading. Usually, they look like this:

Classic divergence

Classic divergence - MACD
Classic divergence - MACD indicator

Classic convergence

Classic convergences - MACD
Classic convergences - MACD indicator

Apart from the classic ones, there are also hidden convergences/divergences. Hidden divergences and convergences also represent the difference between the price chart and the indicator values; the thing is, they are models of trend continuation.

Hidden bearish divergence

It appears when price maximums decline while oscillator maximums grow.

Hidden bearish divergence - MACD indicator
Hidden bearish divergence - MACD indicator

Hidden bullish convergence

It appears when price minimums grow while oscillator minimums decline.

Hidden bullish convergence - MACD indicator
Hidden bullish convergence - MACD indicator

Divergences and convergences are merely types of trading signals; however, they are signals of high quality that make trading potentially more successful. No one can be absolutely sure whether the correction will be short or deep and whether it will turn into a reversal; nevertheless, such signals as divergence and convergence make predictions more accurate.

Trading with the MACD

As any other indicator, the MACD has several ways of using it. On the one hand, the indicator is based on the Moving Averages, so it can show the direction of the market trend, which allows for trading accordingly. On the other hand, this indicator is an oscillator that can produce quality signals in the sideways trend. In most recommendations the difference between the price chart and the indicator values is singled out as the major signal. According to Alexander Elder, this signal is the strongest one in technical analysis. However, there are other ways of trading with the MACD, like searching for reversal models or creating trend lines. These ways are not used frequently, the signals themselves are not frequent either, but if they do appear, they normally work well.

Crossing the signal line of the histogram

Crossing of the two Averages is the moment when the histogram crosses the zero mark at the beginning of a new trend. If the difference between the two Averages enlarges alongside the values of the histogram, the current trend may be called strong. In this case the market should be entered at the moment when the signal line crosses the border of the histogram area. If the line escapes the histogram area above zero, it signals selling. If it escapes the area below zero, it signals buying.

Crossing The Signal Line Of The Histogram - MACD
Crossing The Signal Line Of The Histogram - MACD

Trading with divergences

The divergence signal forms when the price takes a new minimum, but the indicator chart does not confirm this movement, and the minimum is not renewed. The MACD chart makes such divergences clearly visible, signaling the trader to buy. It is worth remembering that this signal works well during sideways movements. However, if the trend is really strong, the efficiency of such signals becomes significantly less.

There are several ways of trading with divergences: for example, many traders wait for the price to fall 30-50 points below the previous minimum and then buy hoping that the price will bounce back. The protective Stop Loss in such case is fixed around 30 to 50 points from the point of entering the market. The second way of trading with divergences consists of waiting for the signal line to escape the histogram area. Then the trader enters the market and exits it when the line returns inside the histogram area.

Trading with Divergences - MACD
Trading with Divergences - MACD

The Bollinger Bands and the MACD

In order to use the divergences more efficiently, traders add the second indicator to the chart and receive additional signals. The Bollinger Bands indicator is one example of such supplementary instruments. The bands of the indicator demonstrate current borders of the maximum and minimum price; breaking through them is considered a strong fluctuation. If there forms a divergence at the same time as the price breaks through the border line, it is considered a strong signal for opening the position. Returning inside the borders, the price confirms that the impulse is over, and it is trying to move inside the divergences.

The Bollinger Bands and the MACD
The Bollinger Bands and the MACD

Divergence and convergence along the trend

The most efficient way of trading according to divergences would be differentiating the signals that go in the direction of the trend and against it. The signal going in the direction of the trend is considered to be very strong and more likely to work well than the signal against the current trend. It is important to use the daily chart for figuring out the direction of the trend and H1 for finding divergences on the MACD.

On the daily chart traders usually add two Moving Averages with different periods in order to define the current trend more accurately. If the Average with a shorter period goes over the Average with a longer period, the trend is considered ascending. The trader is now to find divergences on the MACD H1. Conversely, if the Average with the shorter period goes below the one with the longer period, the trend is considered descending, and there are only convergences to be found on the MACD.

Divergence and Convergence along the trend - MACD
Divergence and Convergence along the trend - MACD

Head And Shoulders on the MACD

Looking for graphic models on the chart is quite uncommon among traders; however, this approach is rather efficient. Not all the models are to be searched for but only the Head and Shoulders one. What is more, the price chart itself may show no signs of a reversal, while on the MACD histogram a clear reversal model appears. The best moment for entering the market would be the right shoulder, same as when trading the classic way with a normal price chart. The point where the signal line escapes the histogram area may be another entrance point. To exit, one should wait for the signal line to enter the histogram area.

Head And Shoulders - MACD
Head And Shoulders - MACD

Creating a trend line

Another uncommon way of using the indicator is creating trend lines. This way is meant for experienced traders who have at least come across chart analysis. For creating trend lines daily charts and H4 suit best. If we work on smaller periods, there will be much more signals, that is why only the signals in the direction of the current trend should be taken into account. Creating a descending trend line along the maximums of the histogram, the trader will potentially get a resistance area that the price chart itself most often does not show. The moment of testing of this area may be used as a signal for opening a selling position. The point in which the signal line exits the histogram area will be the opening point.


Regardless of this indicator having been created almost 40 years ago, it is still highly popular. It has, of course, its advantages and drawbacks, as other indicators do. Some might say that it is outdated and requires upgrading. Others prefer it as it has been created and exists nowadays. This question is for each trader to answer independently. MACD settings are so flexible that they can be adapted for any instrument or timeframe.

Of course, signals should not be expected to turn out 100% true; no indicators, no matter what patterns they work along, give 100% accurate predictions. However, the MACD together with other indicators and various setting combinations can be useful not only on Forex, but on the commodity market as well. The Holy Grail of trading on the finance market has not been discovered yet, and even if it exists, it is kept in such secret that it is not going to be presented to the public for a long time.

Open Trading Account

Material is prepared by

Financial analyst and successful trader; in his practice, prefers highly volatile instruments. Delivers daily webinars on trading and designs RoboForex educational materials.