// RCI_3Line.mq4 // Ver 1.30 // 2009/03/22 // Copyright © 2009,Nariten. // http://www.nariten.com #property copyright "Copyright © 2009,Nariten." #property link "http://www.nariten.com" //---- #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 Maroon #property indicator_color2 Blue #property indicator_color3 Green #property indicator_minimum -100 #property indicator_maximum 100 //---- input parameters extern int tPr1 = 9; extern int tPr2 = 26; extern int tPr3 = 52; //---- buffers double Buff1[]; double Buff2[]; double Buff3[]; int D0[]; int D1[]; int D2[]; int D3[]; int tPrMax; double n1,n2,n3; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { int i; //---- indicator lines SetIndexBuffer(0,Buff1); SetIndexBuffer(1,Buff2); SetIndexBuffer(2,Buff3); SetIndexStyle(0,DRAW_LINE); SetIndexStyle(1,DRAW_LINE); SetIndexStyle(2,DRAW_LINE); SetIndexLabel(0,"RCI1:"+tPr1); SetIndexLabel(1,"RCI2:"+tPr2); SetIndexLabel(2,"RCI3:"+tPr3); IndicatorShortName("RCI 3line("+tPr1+","+tPr2+","+tPr3+")"); //---- ArrayResize(D1, tPr1); ArrayResize(D2, tPr2); ArrayResize(D3, tPr3); tPrMax=tPr1; if (tPr2>tPrMax) tPrMax=tPr2; if (tPr3>tPrMax) tPrMax=tPr3; ArrayResize(D0, tPrMax); for(i=0; i0) limit = Bars - count; ArrayCopy(D1,D0,0,0,tPr1); ArrayCopy(D2,D0,0,0,tPr2); ArrayCopy(D3,D0,0,0,tPr3); n=limit; d1=0; for(i=0; i=0; n--) { d1=0; for(i=tPr1-1; i>=1; i--) { D1[i]=D1[i-1]-2; if(Close[n+i]=1; i--) { D2[i]=D2[i-1]-2; if(Close[n+i]=1; i--) { D3[i]=D3[i-1]-2; if(Close[n+i]