#property indicator_separate_window #property indicator_buffers 2 #property indicator_minimum 0 #property indicator_color1 SeaGreen #property indicator_color2 Crimson double UpTicks[]; double DownTicks[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorShortName("TicksSeparateVolume("+Symbol()+")"); SetIndexBuffer(0,UpTicks); SetIndexBuffer(1,DownTicks); SetIndexStyle(0,DRAW_HISTOGRAM,0,3); SetIndexStyle(1,DRAW_HISTOGRAM,0,2); SetIndexLabel(0,"UpTicks"); SetIndexLabel(1,"DownTicks"); return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { ObjectDelete("UpTicks1"); ObjectDelete("DownTicks1"); ObjectDelete("UpTicks2"); ObjectDelete("DownTicks2"); Comment(""); return(0); } //+------------------------------------------------------------------+ //| Ticks Volume Indicator | //+------------------------------------------------------------------+ int start() { ObjectDelete("UpTicks1"); ObjectDelete("DownTicks1"); ObjectDelete("UpTicks2"); ObjectDelete("DownTicks2"); int i,counted_bars=IndicatorCounted(); //---- check for possible errors if(counted_bars<0) return(0); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; //---- for(i=0; i