#property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 C'200,0,0' #property indicator_color2 C'0,200,0' extern int MaxDrawTicks=5000; double ExtMapBuffer1[]; double ExtMapBuffer2[]; int myBars; int tickCounter; int delimeterCounter; string nume1,nume2; int init() { int i; nume1 ="Bid_"+Symbol(); nume2 ="Ask_"+Symbol(); GlobalVariableSet(nume1,0); GlobalVariableSet(nume2,0); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0, ExtMapBuffer1); SetIndexEmptyValue(0,0.0); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1, ExtMapBuffer2); SetIndexEmptyValue(1,0.0); for (i=Bars-1;i>=0;i--) ExtMapBuffer1[i]=0.0; for (i=Bars-1;i>=0;i--) ExtMapBuffer2[i]=0.0; return(0); } void SetDelimeter() { string delimeterDate=TimeToStr(Time[0]); if (myBars!=0) { int handle=WindowFind("Ticks"); if(!ObjectCreate(delimeterDate,OBJ_VLINE,handle,Time[0],0)) { Print("Error",GetLastError(),delimeterDate); } else { ObjectSet(delimeterDate,OBJPROP_COLOR,C'195,195,195'); ObjectSet(delimeterDate,OBJPROP_STYLE,STYLE_DOT); ObjectSet (delimeterDate,OBJPROP_BACK, true); ObjectsRedraw(); } } return(0); } void ShiftArray() { int V_lines,i1; string delimeterName; datetime firstTime; int BarFirstTime; if (tickCounter>2*MaxDrawTicks) { for (i1=tickCounter;i1>=MaxDrawTicks;i1--) ExtMapBuffer1[i1]=0.0; for (i1=tickCounter;i1>=MaxDrawTicks;i1--) ExtMapBuffer2[i1]=0.0; tickCounter=MaxDrawTicks; } for(int cnt=tickCounter;cnt>0;cnt--) { ExtMapBuffer1[cnt]=ExtMapBuffer1[cnt-1]; ExtMapBuffer2[cnt]=ExtMapBuffer2[cnt-1]; } V_lines=ObjectsTotal(); for (int z=0;z