#property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Red //---- input parameters extern string Instr="GBPUSD"; extern int multistep=6; extern bool mirror=false; double OUT[]; int init() { //---- indicators IndicatorShortName("AnotherInstr "+Instr); SetIndexStyle(0,DRAW_HISTOGRAM); SetIndexBuffer(0,OUT); //---- return(0); } int deinit() { return(0); } int start() { int limit; int counted_bars=IndicatorCounted(); limit=Bars-counted_bars; for(int i=0; i0) double pos=(anotherCl-anotherLo)/anotherWidth; else pos=0; if (mirror) MA=MA+(Hi-pos*Width); else MA=MA+(Lo+pos*Width); period=period*2; }//for OUT[i]=Cl-MA/multistep; }//for return(0); }