#property copyright "Copyright © 2005, Yura Prokofiev" #property link "Yura.prokofiev@gmail.com" #property indicator_separate_window #property indicator_buffers 5 #property indicator_color1 CLR_NONE #property indicator_color2 Lime #property indicator_color3 Red #property indicator_color4 Gray #property indicator_color5 SlateBlue extern int period=8; extern int WingDingUp = 110; extern int WingDingDn = 110; extern bool arrows=0; extern bool trace=1; extern int tracebar = 2; extern double tracek=1.5; extern int shift=0; double ExtBuffer0[]; double ExtBuffer1[]; double ExtBuffer2[]; double ExtBuffer3[]; double ExtBuffer4[]; int init() { if (arrows) { SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,WingDingUp); SetIndexEmptyValue(1,EMPTY_VALUE); SetIndexStyle(2,DRAW_ARROW); SetIndexArrow(2,WingDingDn); SetIndexEmptyValue(2,EMPTY_VALUE); } else { SetIndexStyle(0,DRAW_NONE); SetIndexStyle(1,DRAW_HISTOGRAM); SetIndexStyle(2,DRAW_HISTOGRAM); SetIndexStyle(0,DRAW_NONE); if (trace) SetIndexStyle(0,DRAW_SECTION); } IndicatorDigits(Digits+1); for (int i=0; i0) counted_bars--; limit=Bars-counted_bars; for(int i=0; i=0; i--) { current=ExtBuffer0[i]; prev=ExtBuffer0[i+1]; if (((current<0)&&(prev>0))||(current<0)) up= false; if (((current>0)&&(prev<0))||(current>0)) up= true; if(!up) { if(arrows) ExtBuffer2[i]=0.0; else ExtBuffer2[i]=current; ExtBuffer1[i]=EMPTY_VALUE; } else { if(arrows) ExtBuffer1[i]=0.0; else ExtBuffer1[i]=current; ExtBuffer2[i]=EMPTY_VALUE; } } // ExtBuffer3[i]=EMPTY_VALUE; {//if (trace) //ExtBuffer3[i+1]=ExtBuffer0[i+1]; } return(0); }