#property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Blue #property indicator_color2 Red double UpBuffer[]; double DnBuffer[]; int up, dn, bart, startbar, MaxClose, MinClose, bareh, barel; double p; int init() { SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2); SetIndexBuffer(0,UpBuffer); SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,2); SetIndexBuffer(1,DnBuffer); SetIndexDrawBegin(0,0); SetIndexDrawBegin(1,0); return(0); } int start() { startbar=iBars(NULL,1); if(Digits==2) p=0.01; if(Digits==3) p=0.001; if(Digits==4) p=0.0001; if(Digits==5) p=0.00001; int close=MathRound(NormalizeDouble(iClose(NULL,1,0),Digits)/p); int open=MathRound(NormalizeDouble(iOpen(NULL,1,0),Digits)/p); int high=MathRound(NormalizeDouble(iHigh(NULL,1,0),Digits)/p); int low=MathRound(NormalizeDouble(iLow(NULL,1,0),Digits)/p); if(bartMaxClose && bareh