#property indicator_separate_window #property indicator_buffers 5 #property indicator_color1 Blue //Blanc #property indicator_color2 Red //SRSI Line #property indicator_color3 Blue //SMA Histogram Up #property indicator_color4 White //SMA Histogram Dn #property indicator_color5 Red //SMA Histogram Dn #property indicator_width1 1 #property indicator_width2 1 #property indicator_width3 1 #property indicator_width4 1 #property indicator_width5 1 //-----------------Buffers---------------------------------------- double RSI[]; double SRSI[]; //SRSI Line (EmaOfRSI) double TempEma[]; //Ema3OfEma3OfRSI14 (Needed for the next line) double SMA[]; //SMA Line (Ema3OfEm3aOfEma3OfRSI14) double DMA[]; //DMA Line (EmaOfEmaOfEmaOfRSI) //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorBuffers(6); SetIndexBuffer (0,RSI); SetIndexStyle (0,DRAW_NONE); SetIndexBuffer (1,TempEma); SetIndexStyle (1,DRAW_NONE); SetIndexBuffer (2,SMA); SetIndexStyle (2,DRAW_HISTOGRAM); SetIndexBuffer (3,SRSI); SetIndexStyle (3,DRAW_LINE); SetIndexBuffer (4,DMA); SetIndexStyle (4,DRAW_LINE); SetLevelStyle(STYLE_DOT, 1, Gray); SetLevelValue(0, 70); SetLevelValue(1, 60); SetLevelValue(2, 50); SetLevelValue(3, 40); SetLevelValue(4, 30); return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int i, limit; int counted_bars=IndicatorCounted(); if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //---- for(i=0; i<limit; i++) RSI[i] = iRSI(NULL,0,14,PRICE_CLOSE,i); for(i=0; i<limit; i++) SRSI[i] = iMAOnArray(RSI,Bars,3,0,MODE_EMA,i); for(i=0; i<limit; i++) TempEma[i] = iMAOnArray(SRSI,Bars,3,0,MODE_EMA,i); for(i=0; i<limit; i++) SMA[i] = iMAOnArray(TempEma,Bars,3,0,MODE_EMA,i); for(i=0; i<limit; i++) DMA[i] = iMAOnArray(SMA,Bars,5,0,MODE_SMA,i); //---- return(0); } //+------------------------------------------------------------------+
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Regards, Finn