5.0 02 Find and signal divergence. To color histogram Download here: https://www.mediafire.com/file/qzcxtx5ftaadzcg/MACD_Color_Histogram_indicator_for_MetaTrader_4.mq4/file Or code Mql4 here //+——————————————————————+//|                                       MACD Colored Histogram.mq4 |//|                        Copyright 2018, MetaQuotes Software Corp. |//|                                             https://www.mql5.com |//+——————————————————————+#property copyright “Copyright 2018, MetaQuotes Software Corp.”#property link      “https://www.mql5.com”#property version   “1.00”#property strict #property  indicator_separate_window#property  indicator_buffers 4#property  indicator_color1   Lime#property  indicator_color2   Red#property  indicator_color3   SlateGray#property  indicator_color4   Magenta #property indicator_width1 2#property indicator_width2 2#property indicator_width3 2#property indicator_width4 1 #property indicator_level1  0#property indicator_levelcolor Silver extern int fast_ema_period=12;extern int slow_ema_period=26;extern int signal_period=9; double UpBuffer[];double DownBuffer[];double ZeroBuffer[];double SigMABuffer[];//+——————————————————————+//| Custom indicator initialization function                         |//+——————————————————————+int OnInit()  {//— indicator buffers mapping   Read More →

5.0 01 //=============//#property copyright “Copyright 2019, Nikolaos Pantzos”#property link      “https://www.mql5.com/en/users/pannik”#property version   “1.0”#property strict//=============//#property indicator_separate_window#property indicator_buffers 2#property indicator_color1 clrDodgerBlue#property indicator_color2 clrRed//=============//extern int FastPeriod=12;extern int SlowPeriod=26;extern int SignalPeriod=9;extern ENUM_APPLIED_PRICE AppliedPrice=PRICE_CLOSE;extern int BarsForAveragePrice=140;extern double PercentageLevelUp=25;extern double PercentageLevelDn=25;//===============//double UpBuffer[];double DnBuffer[];//==============//int OnInit(void)  {//——————————————————————————–   string iName=”iMACD_Histo(“+IntegerToString(FastPeriod)+”,”+IntegerToString(SlowPeriod)+”,”+IntegerToString(SignalPeriod)+”)”;//——————————————————————————–   IndicatorShortName(iName);   IndicatorDigits((int)MarketInfo(Symbol(),MODE_DIGITS));//——————————————————————————–   SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,3);   SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,3);   SetIndexBuffer(0,UpBuffer);   SetIndexBuffer(1,DnBuffer);//——————————————————————————–   SetIndexLabel(0,”UpTrend”);   SetIndexLabel(1,”DownTrend”);//——————————————————————————–   SetIndexDrawBegin(0,SlowPeriod);   SetIndexDrawBegin(1,SlowPeriod);//——————————————————————————–   return(INIT_SUCCEEDED);//——————————————————————————–  }//==============//int OnCalculate(const int rates_total,                const int prev_calculated,                const datetime &time[],                const double &open[],                const double &high[],                const double &low[],                const double &close[],                const long &tick_volume[],                const long &volume[],                const int &spread[])  {//——————————————————————————–   int IndicatorShift=0;   int IndicatorTrend=0;   double IndicatorValue=0;   double AvrgValue=0;//——————————————————————————–   for(IndicatorShift=Bars-SlowPeriod-1; IndicatorShift>=0; IndicatorShift–)     {      AvrgValue=iMACD(NULL,0,FastPeriod,BarsForAveragePrice,SignalPeriod,AppliedPrice,MODE_MAIN,IndicatorShift);      IndicatorValue=iMACD(NULL,0,FastPeriod,SlowPeriod,SignalPeriod,AppliedPrice,MODE_MAIN,IndicatorShift);      //—      if(IndicatorValue>AvrgValue+((AvrgValue*PercentageLevelDn)/100))         IndicatorTrend=-1;      if(IndicatorValue<AvrgValue-((AvrgValue*PercentageLevelUp)/100))         IndicatorTrend=1;      //—      if(IndicatorTrend>0)        {         if(IndicatorValue>AvrgValue-((AvrgValue*PercentageLevelUp)/100)/2)            UpBuffer[IndicatorShift]=1.0;         else            UpBuffer[IndicatorShift]=1.0;         DnBuffer[IndicatorShift]=0;        }      //—      if(IndicatorTrend<0)        {         if(IndicatorValue<AvrgValue+((AvrgValue*PercentageLevelDn)/100)/2)            DnBuffer[IndicatorShift]=1.0;         else            DnBuffer[IndicatorShift]=1.0;         UpBuffer[IndicatorShift]=0;        }     }//———————————————————————————–   return(rates_total);//———————————————————————————–  }//===============//Read More →