#property copyright "Copyright © 2005, Yura Prokofiev" #property link "Yura.prokofiev@gmail.com" #property indicator_separate_window #property indicator_buffers 4 #property indicator_color1 Blue #property indicator_color2 Lime #property indicator_color3 Red #property indicator_color4 Gray extern int period=8; extern int WingDingUp = 110; extern int WingDingDn = 110; extern bool arrows=0; extern bool trace=1; extern double tracek=1.5; extern int shift=0; double ExtBuffer0[]; double ExtBuffer1[]; double ExtBuffer2[]; double ExtBuffer3[]; 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[0]=tracek*current; ExtBuffer1[0]=EMPTY_VALUE; } else { if(arrows) ExtBuffer1[i]=0.0; else ExtBuffer1[0]=tracek*current; ExtBuffer2[0]=EMPTY_VALUE; } } // ExtBuffer3[i]=EMPTY_VALUE; {//if (trace) //ExtBuffer3[i+1]=ExtBuffer0[i+1]; } return(0); }