7_Macd Indicator For MT4

7_Macd Indicator For MT4

The 7_Macd Indicator For MT4 allows the traders to learn about the overbought and oversold condition of the currency pairs. If the blue bars in the histogram formed above the reference line, you can expect a bullish tone. On the contrary, blue bars forming below the histogram indicates selling momentum.

FREE 7_Macd Indicator

Download the FREE 7_Macd Indicator for MT4.

To receive my email 100% sure: 
Put my email on your whitelist!

 

Partially Automated Trading Besides Your Day Job

Alerts In Real-Time When Divergences Occur

My Recommended MT4/MT5 Broker

 

Installing the 7_Macd Indicator For MT4

After you downloaded the indicator via the form above you need to unzip the zip-file. Then you need to copy the file 7_Macd.mq4 into the folder MQL4\Indicators of your MT4 installation. After that please restart MT4 and then you will be able to see the indicator in the list of indicators.

Parameters of the 7_Macd Indicator For MT4

The 7_Macd Indicator For MT4 has 5 parameters to configure.

extern int FastEMA=9;
extern int SlowEMA=64;
extern int SignalSMA=112;
extern bool plotArrows=false;
extern double HistThreshold=0;

Buffers of the 7_Macd Indicator For MT4

The 7_Macd Indicator For MT4 provides 5 buffers.

SetIndexBuffer(0,Buffer1);
SetIndexBuffer(1,Buffer2);
SetIndexBuffer(2,Buffer3);
SetIndexBuffer(3,Buffer4);
SetIndexBuffer(4,Buffer5);

Main Parts Of The Code

int start()
  {
   int counted_bars=IndicatorCounted();
   if(counted_bars lt 0) return(-1);//---- check for possible errors
   if(counted_bars gt 0) counted_bars--;//---- last counted bar will be recounted
   limit=Bars-counted_bars;
   //----
   for(i=0; i lt limit; i++)//---- macd counted in the 1-st buffer histogram
      Buffer1[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);
   //----
   for(i=0; i lt limit; i++)//---- signal line counted in the 2-nd buffer line
      Buffer2[i]=iMAOnArray(Buffer1,Bars,SignalSMA,0,MODE_SMA,i);
   //----
   for(i=0; i lt limit; i++)//---- histogram is the difference between macd and signal line
     {
      Buffer3[i]=Buffer1[i]-Buffer2[i];
      Buffer5[i]=0;
     }
   //----
   for(i=1; i lt limit; i++)//---- macd[1]
      Buffer4[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i-1)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i-1);
   //----
   if (plotArrows)
     {
      ObjectsDeleteAll();
      InLTrade=false;
      InSTrade=false;
      for(int i=Bars;i gt =0;i--)
        {
         if ((Buffer3[i-1]   gt  0) && (Buffer3[i]  lt  0) && Buffer3[i-1]  gt  HistThreshold)//Long Begin
           {
            string upArrow1=NewArrow(Time[i-1], High[i-1]+0.0005, Blue);
            InLTrade=true;
           }
         if ((Buffer3[i-1]   lt  0) && (Buffer3[i]  gt  0) && Buffer3[i-1]  lt  -HistThreshold)//Short Begin
           {
            string dnArrow1=NewArrow(Time[i-1], Low[i-1]-0.0003, Red);
            InSTrade=true;
            InLTrade=false;
           }
         if ((InSTrade ==true) && (Buffer3[i-1]  gt  Buffer3[i]))//Short End
           {
            string upArrow2=NewArrow(Time[i-1], Low[i-1]-0.0003, Aqua);
            InSTrade=false;
           }
         if ((InLTrade==true) && (Buffer3[i-1]  lt  Buffer3[i]))//Long End
           {
            string dnArrow2=NewArrow(Time[i-1], High[i-1]+0.0005, Aqua);
            InLTrade=false;
           }
        }
     }
   //----
   return(0);
  }
//+------------------------------------------------------------------+

 

About Me

I'm Mike Semlitsch the owner of PerfectTrendSystem.com. My trading career started in 2007. Since 2013 I have helped thousands of traders to take their trading to the next level. Many of them are now constantly profitable traders. 

The following performance was achieved by me while trading live in front of hundreds of my clients:

Connect With Me:  

This FREE Indicator Can Transform
Your Trading!

FREE Indicator + Telegram Group


Request the Ultimate Double Top/Bottom Indicator which is used by 10,000+ traders.

Results From 5 Months!
This service starts soon! Be the first who get's notified when it begins!