Divergence Indicator For MT5

Divergence Indicator For MT5

Table Of Contents:

  1. Divergence Indicator For MT5
  2. Instalar la Divergence Indicator For MT5
  3. Parámetros de la Divergence Indicator For MT5
  4. Buffers of the Divergence Indicator For MT5
  5. Partes principales del código

El Divergence Indicator For MT5 es una herramienta única que analiza los datos del indicador y el movimiento del precio para que pueda encontrar el precio exacto donde el valor del indicador no coincide con los detalles técnicos. La mayoría de las veces, los operadores ingenuos no saben cómo filtrar las señales comerciales falsas. Confían en el enfoque tradicional de gestión de riesgos para poder aceptar las operaciones perdedoras sin tener ningún estrés. Pero con la ayuda de este indicador, puede evaluar fácilmente la anomalía en los datos técnicos y esto le ayudará a mantenerse al margen. Por el contrario, cuando la lectura del indicador se sincroniza completamente con la evaluación manual, puede colocar el comercio con el nivel de confianza. Cuando use esta herramienta, asegúrese de nunca correr demasiado riesgo aunque esté utilizando una de las formas más efectivas para encontrar excelentes operaciones.

FREE Divergence Indicator

Download the FREE Divergence Indicator for MT5.

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

 

Instalar la Divergence Indicator For MT5

Después de descargar el indicador a través del formulario anterior, debe descomprimir el archivo zip. Luego, debe copiar el archivo divergence.mq5 en la carpeta MQL5Indicators de su instalación MT5 . Después de eso, reinicie MT5 y luego podrá ver el indicador en la lista de indicadores.

Parámetros de la Divergence Indicator For MT5

Divergence Indicator For MT5 tiene parámetros 6 para configurar.

input INDMODE ind=MODE_MACD;     //indicator input uint pds=10;               //indicator periods input PRICEMODE f=MODE_CLOSE;    //price field input double dCh=0;              //peak/trough depth minimum (0-1) input uint xshift=0;             //shift signals back to match divergences input int Shift=0;               //horizontal shift of the indicator in bars 

Buffers of the Divergence Indicator For MT5

Divergence Indicator For MT5 proporciona buffers 10 .

SetIndexBuffer(0,ExtOpenBuffer,INDICATOR_DATA); SetIndexBuffer(1,ExtHighBuffer,INDICATOR_DATA); SetIndexBuffer(2,ExtLowBuffer,INDICATOR_DATA); SetIndexBuffer(3,ExtCloseBuffer,INDICATOR_DATA); SetIndexBuffer(4,ExtColorBuffer,INDICATOR_COLOR_INDEX); SetIndexBuffer(5,R1,INDICATOR_CALCULATIONS); SetIndexBuffer(6,R2,INDICATOR_CALCULATIONS); SetIndexBuffer(7,y,INDICATOR_CALCULATIONS); SetIndexBuffer(8,xd,INDICATOR_CALCULATIONS); SetIndexBuffer(9,xu,INDICATOR_CALCULATIONS); 

Partes principales del código

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[])   { //---- checking for the sufficiency of bars for the calculation    if(BarsCalculated(Ind_Handle) lt rates_total || rates_total lt min_rates_total) return(RESET);  //---- declaration of local variables     int limit,to_copy,bar,CNmb1,CNmb2,CNmb3,CNmb4;    double Pkx1,Pkx2,Trx1,Trx2,Pky1,Pky2,Try1,Try2;    bool Trx,Pkx,Try,Pky;  //---- calculations of the necessary amount of data to be copied and //the starting number limit for the bar recalculation loop    if(prev_calculated gt rates_total || prev_calculated lt =0)// checking for the first start of the indicator calculation      {       limit=rates_total-1-min_rates_total-3; // starting index for the calculation of all bars      }    else      {       limit=rates_total-prev_calculated; // starting index for the calculation of new bars      }     to_copy=limit+1;  //---- copy newly appeared data into the arrays    if(CopyBuffer(Ind_Handle,MAIN_LINE,0,to_copy,y) lt =0) return(RESET);  //---- indexing elements in arrays as timeseries      ArraySetAsSeries(high,true);    ArraySetAsSeries(low,true);    ArraySetAsSeries(close,true);    ArraySetAsSeries(open,true);     for(bar=limit; bar gt =0 && !IsStopped(); bar--)      {       if(f==MODE_CLOSE)         {          xu[bar]=close[bar];          xd[bar]=close[bar];         }       else         {          xu[bar]=high[bar];          xd[bar]=low[bar];         }        ExtOpenBuffer [bar]=0.0;       ExtCloseBuffer[bar]=0.0;       ExtHighBuffer [bar]=0.0;       ExtLowBuffer  [bar]=0.0;      }  //---- main loop of the indicator calculation    for(bar=limit; bar gt =2 && !IsStopped(); bar--)      {       CNmb1=0;       CNmb2=0;       CNmb3=0;       CNmb4=0;        for(int kkk=bar; kkk lt rates_total; kkk++)         {          Pkx=xu[kkk] lt xu[kkk-1] && xu[kkk-1] gt xu[kkk-2] && xu[kkk-1] gt =(xu[kkk]+xu[kkk-2])/2.0*(1.0+fCh);           if(Pkx) CNmb1++;          if(Pkx && CNmb1==1) Pkx1=xu[kkk-1];          if(Pkx && CNmb1==2) Pkx2=xu[kkk-1];           Trx=xd[kkk] gt xd[kkk-1] && xd[kkk-1] lt xd[kkk-2] && xd[kkk-1] lt =(xd[kkk]+xd[kkk-2])/2.0*(1.0-fCh);           if(Trx) CNmb2++;          if(Trx && CNmb2==1) Trx1=xd[kkk-1];          if(Trx && CNmb2==2) Trx2=xd[kkk-1];           Pky=y[kkk] lt y[kkk-1] && y[kkk-1] gt y[kkk-2] && y[kkk-1] gt =(y[kkk]+y[kkk-2])/2.0*(1.0+fCh);           if(Pky) CNmb3++;          if(Pky && CNmb3==1) Pky1=y[kkk-1];          if(Pky && CNmb3==2) Pky2=y[kkk-1];           Try=y[kkk] gt y[kkk-1] && y[kkk-1] lt y[kkk-2] && y[kkk-1] lt =(y[kkk]+y[kkk-2])/2.0*(1.0-fCh);           if(Try) CNmb4++;          if(Try && CNmb4==1) Try1=y[kkk-1];          if(Try && CNmb4==2) Try2=y[kkk-1];           if(CNmb1 gt =2 && CNmb2 gt =2 && CNmb3 gt =2 && CNmb4 gt =2) break;         }        Pkx=xu[bar] lt xu[bar-1] && xu[bar-1] gt xu[bar-2] && xu[bar-1] gt =(xu[bar]+xu[bar-2])/2.0*(1.0+fCh);       Trx=xd[bar] gt xd[bar-1] && xd[bar-1] lt xd[bar-2] && xd[bar-1] lt =(xd[bar]+xd[bar-2])/2.0*(1.0-fCh);       Pky=y[bar] lt y[bar-1] && y[bar-1] gt y[bar-2] && y[bar-1] gt =(y[bar]+y[bar-2])/2.0*(1.0+fCh);       Try=y[bar] gt y[bar-1] && y[bar-1] lt y[bar-2] && y[bar-1] lt =(y[bar]+y[bar-2])/2.0*(1.0-fCh);        R1[bar]=0;       if(Trx && Try && Trx1 lt Trx2 && Try1 gt Try2) R1[bar]=1;        R2[bar]=0;       if(Pkx && Pky && Pkx1 gt Pkx2 && Pky1 lt Pky2) R2[bar]=1;        if(R1[bar]-R2[bar] gt 0)         {          ExtOpenBuffer[bar]=open[bar];          ExtCloseBuffer[bar]=close[bar];          ExtHighBuffer[bar]=high[bar];          ExtLowBuffer[bar]=low[bar];          if(close[bar] gt open[bar]) ExtColorBuffer[bar]=3;          else ExtColorBuffer[bar]=2;         }        if(R1[bar]-R2[bar] lt 0)         {          ExtOpenBuffer[bar]=open[bar];          ExtCloseBuffer[bar]=close[bar];          ExtHighBuffer[bar]=high[bar];          ExtLowBuffer[bar]=low[bar];          if(open[bar] gt close[bar]) ExtColorBuffer[bar]=0;          else ExtColorBuffer[bar]=1;         }      } //----         return(rates_total);   } //+------------------------------------------------------------------+ 

 

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:  

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

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.