Rejoindre la communauté
banner_forum
Devenez membre de la plus grande
communauté francophone sur le Forex
Partagez, échangez et apprenez en gagnant des crédits sur votre compte de trading

Indicateur - Regularized momentum, MQL4

  • Pickup

    bonjour,
    voila je partage cette indicateur basé sur momentum , il ne repeint pas , je l'ai test et pas vu de peinture .
    il est possible de crées un EA sur croisement pour les amateurs d' expert , je m'en occuperait dans 2 semaines pour voir sont évolutions
    on peut le placer en 14 , 50 par exemple photo illustrée , libre choix .

    Citation :
    //+------------------------------------------------------------------ //| //+------------------------------------------------------------------ #property indicator_separate_window #property indicator_buffers 5 #property indicator_color1 LimeGreen #property indicator_color2 LimeGreen #property indicator_color3 Orange #property indicator_color4 Orange #property indicator_color5 DarkGray #property indicator_width1 2 #property indicator_width3 2 #property indicator_width5 2 #property indicator_level1 0 // // // // // extern int Length = 14; extern int Price = PRICE_CLOSE; extern double Lambda = 5; // // // // // double mom[]; double rema[]; double huu[]; double hud[]; double hdd[]; double hdu[]; double slope[]; //+------------------------------------------------------------------ //| //+------------------------------------------------------------------ // // // // // int init() { IndicatorBuffers(7); SetIndexBuffer(0,huu); SetIndexStyle(0,DRAW_HISTOGRAM); SetIndexBuffer(1,hud); SetIndexStyle(1,DRAW_HISTOGRAM); SetIndexBuffer(2,hdd); SetIndexStyle(2,DRAW_HISTOGRAM); SetIndexBuffer(3,hdu); SetIndexStyle(3,DRAW_HISTOGRAM); SetIndexBuffer(4,mom); SetIndexBuffer(5,rema); SetIndexBuffer(6,slope); IndicatorShortName("Regularized momentum ("+Length+")"); return(0); } int deinit() { return(0); } //+------------------------------------------------------------------ //| //+------------------------------------------------------------------ // // // // // int start() { int i,limit,counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; limit = MathMin(Bars-counted_bars,Bars-1); // // // // // double alpha = 2.0 / (1.0*Length); double regf1 = (1.0+Lambda*2.0); double regf2 = (1.0+Lambda); for(i=limit; i>=0; i--) { double price = iMA(NULL,0,1,0,MODE_SMA,Price,i); if (Bars-i>1) rema[i] = (regf1*rema[i+1]+alpha*(price-rema[i+1])-Lambda*rema[i+2])/regf2; else rema[i] = price; mom[i] = (rema[i]-rema[i+1])/rema[i]; slope[i] = slope[i+1]; huu[i] = EMPTY_VALUE; hud[i] = EMPTY_VALUE; hdd[i] = EMPTY_VALUE; hdu[i] = EMPTY_VALUE; if (mom[i] > mom[i+1]) slope[i] = 1; if (mom[i] < mom[i+1]) slope[i] = -1; if (slope[i]== 1 && mom[i]>0) huu[i] = mom[i]; if (slope[i]==-1 && mom[i]>0) hud[i] = mom[i]; if (slope[i]==-1 && mom[i]<0) hdd[i] = mom[i]; if (slope[i]== 1 && mom[i]<0) hdu[i] = mom[i]; } return(0); }
    Modifié le 2016-05-07 21:35:10 par AliX
    Pickup a joint une image
    indicateur-regularized-momentum-mql4-10269
  • Pickup — en réponse à Pickup dans son message #105160

    exemple en 50 .
    Pickup a joint une image
    indicateur-regularized-momentum-mql4-10270
  • Papyrox

    Salut Pickup, tu as vu mon MP ?
  • Pickup

    bonsoir , non pas vu de MP , a quel sujet ?