MACD and Its Power in Forex Trading [With Pictures]

MACD is one of the most reliable indicators. Although we do not believe in using any indicators more than candlesticks and Bollinger Bands in our own trading and we follow the candlesticks charting and Bollinger Bands trading straggly to find the trade setups, still we believe that MACD is a strong indicator specially for the novice traders who are used to get in and out of the market too early.

There are so many professional Forex and stock traders who rely on MACD. Of course, we should not exaggerate about this indicator. It is not a magic tool to show you the buy/sell signals. However, it is one of the best indicators. It can be used along with RSI to confirm the trade setups.

Before You Read the Rest of This Article:
Submit your email to receive our eBook for FREE.
This eBook shows you the shortest way to achieve Success and Financial Freedom:

Why MACD Works?

Before I answer why MACD works, I prefer to explain about one of the most important reasons of Forex traders’ failure. Maybe you have heard this a lot, but it has to be reminded in this article too. Lack of patience is one of the most important reasons of Forex traders’ failure. Most traders are not patient enough to wait for a strong trade setup. After several minutes, hours or days of waiting for a trade setup (depend on the time frame or system they use), they lose their patience and force themselves to take a position while there is no sharp and clear trade setup. So they lose.

On the other hand, when they succeed to take a good position, they get out too early with a small profit, because they are afraid of losing the profit the position has made. They do not have enough patience to hold a position until it hits the target. So they limit their profit because they have no patience to hold their positions longer.

MACD is a solution for these kinds of problems, because it is delayed and this delay forces you to wait more, both when you are waiting for a trade setup, and when you are holding a position. That’s why MACD is recommended both by the Forex and stock traders.

(Note: Heikin Ashi is one of the other tools that helps you wait more both before the trade setup and while you are in the market.)

Sometimes your other indicators and even the price chart, show you a trade setup, but MACD tells you to wait, and it keeps you from going against the trend and losing money. Also in many cases that you want to follow a trend, MACD tells you that it is too late and the trend is exhausted and may reverse at any time. In this article, I am doing my best to cover all of these cases and help you use MACD in your trades in the best possible way.

What Is MACD Definition?

MACD stands for Moving Average Convergence Divergence. MACD is an indicator used in technical analysis. This indicator is developed by Gerald Appel who was a trader and market technical analyst.

MACD is the difference of a 12 and a 26 exponential moving average. MACD subtracts the 26-period from the 12-period and the result will be displayed in a single line which is the MACD main line. Typical MACD indicators, have one extra line, which is an exponential moving average of the main line. This moving average is set to 9 by default and it is called signal line. In MetaTrader or MT4, the default MACD doesn’t have the main MACD line. Instead, it has MACD bars (histogram). On other platforms, you can see both the MACD main line and MACD histogram.

MACD histogram is the difference of MACD main line and the 9 exponential moving average:

MACD Histogram: MACD Main Line – Signal Line

As you see, MACD is nothing but the combination of two moving averages. In spite of this, it is a very strong and reliable indicator because it eliminates the market noise.

MACD Formula

If you are a trader, probably MACD formula will have no use for you. You will need it, if you are a programmer and want to use MACD in designing and developing an EA (expert advisor) or robot, or your custom indicator. However, the formula helps you understand the indicator better. We already talked about this indicator’s calculation:

Main Line: 12 EMA – 26 EMA
Signal Line: 9 EMA of Main Line
Histogram: Main Line – Signal Line

Download the Coloured MACD

The MACD that comes with MetaTrader by default, has only one color with the histogram. If you like to have the same colored MACD we have on our charts (below screenshots), please download and install it to your platform before we start explaining about MACD and the way we use it in technical analysis and forex trading. This indicator works on MetaTrader 4 or MT4. You need to copy and paste it to the /experts/indicators/ folder and then restart your platform and apply the indicator on the price chart. Click Here to download the coloured MACD.

To install the Colored MACD on your MT4 platform, you have to copy the indicator to the “Indicators” folder.

To do that:

  1. Click on “File” menu at the top left of your MT4 platform.
  2. Click on “Open Data Folder”.
  3. Open the “MQL4” folder.
  4. Open the “Indicators” folder.
  5. Copy and paste the indicator to “Indicators” folder.
  6. Restart the MT4 platform.
  7. Open a price chart.
  8. Press Ctrl+N to open the navigator. Open the “Indicators” dropdown.
  9. Drag “LuckScout-MACD.ex4” and drop it on the chart.

If you don’t like to install the colored MACD, then you can use the regular one that comes with MT4 or your favorite trading platform.

How Does MACD Look Like on the Price Chart?

The below chart shows how colored MACD looks like. It also has the Moving Average 9 but we always set it to zero, because we don’t use it. It doesn’t help. In the indicator you downloaded above, it is set to zero by default, but you can change it back to 9 if you like.

The MACD bars (histogram) you see on the below chart, reflect the difference of the main and signal lines. On the price chart, you see the main and signal lines. The red one is the main line and the green line is the signal line. As you see, wherever the distance of these two moving lines is bigger, the MACD bars will become longer too, and wherever these two lines cross, the length of the related MACD bar is zero (follow the black arrows).

As you see, when there is an upward movement and pressure (the market is bullish), MACD histograms go up and change to blue and when there is a downward pressure and movement (the market is bearish), they go down and change the color to red.

MACD and moving averages

MACD bars form highs and lows. When we have an uptrend, they form higher lows and when we have a downtrend, they form lower highs and when the bars go under the zero level, they form lower lows:

Higher highs formed by MACD histogram      Lower lows formed by MACD histogram

How Does MACD Save You from Going against the Trend?

As it was mentioned above, MACD is delayed and is a lagging indicator, and so when you see a reversal signal with the candlesticks and Bollinger Bands and you want to take a position against the trend, MACD stops you. Of course, if you know about the Elliott Waves and also the cycles, you will not take any positions against the trend, even if MACD is not on the chart, but as knowing the cycles and Elliott Waves is very difficult, you can use MACD to stay away from going against the trend.

Please look at the below reversal signal. A candlestick is formed completely out of the Bollinger Bands and then three Bearish candlesticks form that are all reversal signals. Three candlesticks before this, you already had another reversal signal, but you should have ignored it, because it was fresh and it formed right after a big Bullish candlestick. But, the second sell signal (the yellow zone), looks like a good short trade setup. Let’s assume that you wouldn’t have MACD on your chart. You could go short and set your stop loss above the highest high.

False short trade setup

And guess what? Your stop loss would be triggered:

Hitting the stop loss after a false short trade setup

So going against MACD is risky. Of course, the above signal formed by the candlesticks are not strong enough. That is why the price did not reverse and kept on going up. As novice traders are unable to distinguish the strong candlestick trade setups, having MACD can be a big help not to go against the trend based on the weak trade setups.

Going against the trend based on the weak candlestick signals is not the only mistake you could make. MACD also indicates whether the market is overbought or oversold. When it is overbought, it is riskier to go long and when it is oversold, it is riskier to go short. When the market is overbought, Bulls (buyers) can start collecting their profit (they sell) at any time, and so the price may go down, and when the market is oversold, Bears can start buying at any time, and so the price may go up. Of course, the candlesticks also tell you if the market is overbought or oversold, but MACD is also a big help. Let’s take a look at an example:

You are a trend trader. You have an uptrend here (below). You see some reversal signals, but you wait for a continuation signal to go long. A strong Bullish candlestick forms (the last one on the below chart) and at the same time the last MACD bar changes its color and shows an upward pressure. This is what you have been waiting for to go long, but you don’t consider that the market has been going up for a long time (overbought) and can reverse at any time. Of course it can go much higher, but we never know:

Going long while the market is overbought

This position goes up only for one more candlestick and then goes down and triggers your stop loss:

Losing on an overbought market

MACD Buy-Sell Signals

MACD trading is so common among the Forex traders. They just wait for a fresh MACD movement for a few bars and then they enter. MACD is really good for trend trading. It is also good for confirmation of the reversal signals. MACD has to be used as a confirmation only. The main indicator is the price. If you use MACD as a confirmation for support and resistance breakout, it will be a big help. Those who trade based on the support/resistance breakout have to have MACD on their charts if they are experienced enough in technical analysis, otherwise their success rate will not be reasonable.

Look at the below image. There is a trend line with valid and visible support line. You are waiting for the support breakout to go short. MACD starts going down for several candlesticks before the breakout, but you don’t go short because it can bounce up as soon as it touches the support line. One of the candlesticks closes below the support line and at the same time MACD goes up, but it is fresh and it is not oversold. It is above the zero level too. So you go short at the open of the next candlestick, set your stop loss above the high price of the last candlestick and your target will be the next support level. It goes down and hits the target very easily.

MACD confirms the support breakout.

Now look at the below chart which is the same as above, but it just shows another support breakout which happened a while after the above support breakout. Obviously, it is a new chance to take another short position, but look at the MACD and its difference with the previous position. With the previous position, MACD started going down while it was way above the zero level. It means, you would go short while market has been overbought which is a good decision. In this position (below), not only MACD is not above the zero level, but it has already started going up and making higher lows. So the market is oversold and your sell signal is not fresh. It is a second hand sell signal 🙂

And guess what would happen if you went short and you didn’t consider MACD:

going short when the market is oversold results in loss.

Yes, your position triggers the stop loss before it hits the target.

MACD Divergence

MACD Divergence is one of the most famous and the strongest trading signals that MACD generates. MACD Divergence forms when the price goes up and makes higher highs and at the same time, MACD bars go down and make lower highs. If you use the traditional MACD, then the same divergence can form with the main and signal line.

The rule says, the price will finally follow the MACD direction and will go down. However, the problem is you never know when the price will start following the MACD direction. So, if you rush and take a short position right when you see the MACD Divergence, it may keep on going up for several more candlesticks. You should go short when MACD Divergence is followed by a good sell signal by the candlesticks and/or a support breakout.

MACD Divergence can be seen at the end of uptrends. What does it mean? It means if you are a trend trader, you should not go long when a MACD Divergence forms. The market can collapse at any time.

The market changes the direction when a MACD Divergence is formed.

MACD Convergence

MACD Convergence is also a famous signal, but people trust the MACD Divergence more because when the market collapses and goes down, it goes faster and stronger. Fear is stronger than greed and when markets go down, fear is the dominant emotion.

MACD Convergence forms when price goes down and forms lower highs or lower lows, but at the same time MACD bars go up and form higher highs or higher lows. The rule says, the price will finally change the direction and will follow MACD. MACD Convergence can be seen at the end of downtrends. What does it mean? It means if you are a trend trader, you should not go short when you see that MACD Convergence is formed. It can bounce up at any time.

MACD Convergence

Although MACD is a strong indicator and patterns like Divergence and Convergence are also very strong, you should never trade without a reasonable stop loss or exit strategy, and you should never risk more than 2-3% on each trade setup.

Published by

LuckScout Team

"Whether you think you can, or you think you cannot, you are right." - Henry Ford


  1. Hi! many thanks for sharing your thoughts!
    I have been in the markets for over 12 years, but still your detailed approach helps a lot in fine tuning my strategy
    from my experience macd is one of the best indicators. I came to an idea to study macd after a trader i knew from a big bank few years ago was making millions dollars a year using Elliott waves with macd. however i believe macd itself is useful as studying EW theory for over 3 years i came to the conclusion that Elliott waves are just too ambiguous…

    Have 2 questions:

    1) what are other best indicatiors to use with macd (you personal preference)

    2) being a trend trader (i presume you are) what are your thoughts on building up/adding positions i.e like Bill Williams teaches on fractals breakthrough or on rebounds/dips?

    happy to keep in touch! again thanks for your web resource!


  2. Thanks Dr the concept is broadly explained. I have a question how possible is it to use the crossing of the main and signal line in determining the trend movement. Does it have any effect? I notice the predominant upward presense of the Red line which is the main line in an upward trend?

    1. Yes. MACD is a slow and lagging indicator and so it is good for following the trends. Additionally the crossing of the main and signal line usually reflects the trend exhaustion and reversal.

  3. Good day, thank you very much for explained the concept but why I can’t open the coloured MACD indicator?


    1. Just to add, if you are using MT4… following teps can help you

      1.File – > Open Data folder
      2. MQL4 – > Indicators
      3. Copy LuckScout-MACD.ex4
      4. close your MT4 and reopen
      5.Open Your chart and click on add indicator.. should 3rd from right on top
      6. Select Custom – > LuckScout- MACD
      7. As author, you may use with HikenAshi chart

  4. thank you very much for your detailed articles. it helped me a lot and i’m a new trader, I have 1 question.

    1) when i Add the MACD to the chart it asks me to select the ema time frame which isby default slow 26 fst 12. I add it but it doesnt give histogram graph just like the one you put in this article, it rather displays a line down below in the graph, especially that i’m using another platfom and not MTD4, what i’m doing wrong? on my graph I have the BB’s and the candlesticks.

  5. i need to know how to set up MACD signal line. i am using MACD given by meta trader but there is only MACD line, signal line is absent here. how can i set up signal line…

  6. hi…. good explanation…. Although MACD is lagging.. we can use it to assure about right time to enter and stay away…

    Can we set main line and signal line manually ??
    I mean without MACD only use the EMA??
    Please tell me values..

    Main Line: ……..
    Signal Line: ………….

    good luck..

  7. Hi,
    I have read that for Peak-Trough Divergence” MACD forges a lower low and the MACD-Histogram forges a higher low” how can identify that higher and lower low in the graph

  8. Hi

    In the above article, just under the first image, it is written: “MACD bars form highs and lows. When we have an uptrend, they form … higher lows… and when we have a downtrend, they form … lower highs … and when the bars go under the zero level, they form lower lows”. While this seems correct, the images that follow seem to indicate that the ‘.. higher lows..’ should be ‘higher highs’ and the ‘..lower highs ..’ should be ‘lower lows’? A bit unclear here.

    1. Hi Peter,

      You are right. But that is also correct. It is like the uptrend definition which is when price forms higher lows. And downtrend is when price forms lower highs.

      But you are right. That doesn’t look good for MACD.

  9. I do trade auto demarktrend breakout, how can one trade breakout with low low or high high histogram after crossin zero. during break out

  10. Hello,

    First of all, thanks for this awesome website and your excellent mentoring!

    I have downloaded the coloured MACD indicator linked with this article. However, I am unable to have it displayed on my MT4 platform.

    Is this link still working?



    1. Hi Jerry,

      Thank you too and welcome to LuckScout.

      I tried the link. It works. I downloaded the indicator and installed it on my platform and it works without any problems.

      Do you know how to install it on your MT4 platform?

      I just added the installation instruction to the above article. Please scroll up and find it below the download link.

      Please let me know if you still have any problems.

  11. Hello,

    there is something that puzzles me and I would like to short it out.
    Looking at the last image below the MACD histogram the second arrow reads lower low while I reckon it should read higher low. Am I right in thinking so? Thanks in advance

    1. Thanks,. I’ve read the article, but still can’t understand how to recognize the higher lows. Even in this article there are some examples of higher lows, but it’s not much clear what makes them that way. Is it when the bars start to become smaller and closer to the the upper line?

  12. I followed all you instructions. I downloaded the indicator, then I copied it on the indicators folder, but when I press control plus N, I just can see the metatrader MACD, LuckScout MACD doensn’t appear on the indicators list, even if it is inside the indicator folder. What did I do wrong?

    1. Did you refer to the “Open Data Folder” on the file menu at the top and then paste the indicator file in C:\Users\…\MQL4\Indicators folder?

  13. Hi, the setting of the coloured MACD is 12,26, 2. I wanted to use the slower setting you advised us , which is 24,52,9. How can I change that?

  14. Hi,
    Once I added the indicator to my Chart in MT4 only I can see Histograms. Can cannot see Slow EMA & fast EMA. How can I fine-tune it to be visible.

  15. Hi

    I want to make an EA robot with my frend . Please send me ( if possible )the code of the color MACD ( with red and green line)

    Best regards
    Arpad Huszty

    1. Arpad,

      Here it is:

      #property copyright “Copyright ©”
      #property link “”

      #property indicator_separate_window
      #property indicator_buffers 5
      #property indicator_color1 Green
      #property indicator_color2 Red
      #property indicator_color3 Gray
      #property indicator_color4 LimeGreen
      #property indicator_color5 DarkSlateBlue
      extern int FastEMA=12;
      extern int SlowEMA=26;
      extern int SignalSMA=0;
      extern int CountBars=1000;
      extern int Line=2;
      extern double Zero_level=0.0;
      double ind_buffer1[];
      double ind_buffer2[];
      double ind_buffer3[];
      double ind_buffer4[];
      double ind_buffer5[];
      double ind_buffer6[];

      double minuse;
      double Vol;
      double Zml;
      double Color1;
      int init()

      ObjectCreate(“Copyright”, OBJ_LABEL, 0, 0, 0);
      ObjectSetText(“Copyright”, “Learn more about trading:”, 8, “Arial”, Red);
      ObjectSet(“Copyright”, OBJPROP_CORNER, 2);
      ObjectSet(“Copyright”, OBJPROP_XDISTANCE, 5);
      ObjectSet(“Copyright”, OBJPROP_YDISTANCE, 8);

      if(!SetIndexBuffer(0,ind_buffer1) &&
      !SetIndexBuffer(1,ind_buffer2) &&
      !SetIndexBuffer(2,ind_buffer3) &&
      !SetIndexBuffer(3,ind_buffer4) &&
      !SetIndexBuffer(4,ind_buffer5) &&
      Print(“cannot set indicator buffers!”);
      Color1= C’128,0,255′;
      SetIndexStyle(0,DRAW_HISTOGRAM, STYLE_SOLID, Line, Color1);
      SetIndexStyle(1,DRAW_HISTOGRAM, STYLE_SOLID, Line);
      SetIndexStyle(2,DRAW_HISTOGRAM, STYLE_SOLID, Line);
      SetIndexStyle(3,DRAW_LINE, STYLE_SOLID,2);
      SetIndexStyle(4,DRAW_LINE, STYLE_SOLID,1);



      int start()

      SetIndexStyle(0,DRAW_HISTOGRAM, STYLE_SOLID,Line);
      SetIndexStyle(1,DRAW_HISTOGRAM, STYLE_SOLID,Line);
      SetIndexStyle(2,DRAW_HISTOGRAM, STYLE_SOLID,Line);
      SetIndexStyle(3,DRAW_LINE, STYLE_SOLID,1);
      SetIndexStyle(4,DRAW_LINE, STYLE_SOLID,1);

      int limit;
      int counted_bars=IndicatorCounted();
      if(counted_bars<0) return(-1);
      if(counted_bars>0) counted_bars–;

      for(int i=0; i0.0){ind_buffer1[i]=Vol; ind_buffer2[i]=0.0; ind_buffer3[i]=0.0;}
      else {if(minuse<0.0){ind_buffer1[i]=0.0; ind_buffer2[i]=Vol; ind_buffer3[i]=0.0;}
      else {ind_buffer1[i]=0.0; ind_buffer2[i]=0.0; ind_buffer3[i]=Vol;}}

      for(i=0; i

    2. Hi

      I want to make an EA robot. How to do it? I tried to do it buts no success plz help


  16. Hi,

    I use your MACD for all my trades as I find it very reliable when it comes to detecting divergences. My question though is, do you, perhaps, have a MACD version that sends alerts when a diversion is detected and confirmed on any timeframe ?

  17. hi
    i install the MACD colored to my platform . now i have it on my chart. but i have not the main line and signal line on the price chart. is there any wrong through installation?

  18. hello
    the settings for the colorful MACD which we downloaded here must be left as they are or we should use the 24, 52, 9 settings?
    your response will be highly appreciated.

Leave a Reply

Your email address will not be published. Required fields are marked *