//+------------------------------------------------------------------+ //| _TRO_00_Lines | //| | //| | //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 LightGray #property indicator_color2 LightGray #property indicator_color3 LightGray // indicators parameters //---- buffers double P1Buffer[]; double P2Buffer[]; double P3Buffer[]; double xPrice ; int myStyle = 2 ; int myWingDing = 250 ; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { SetIndexBuffer(0, P1Buffer); SetIndexBuffer(1, P2Buffer); SetIndexBuffer(2, P3Buffer); SetIndexArrow(0, myWingDing); SetIndexArrow(1, myWingDing); SetIndexArrow(2, myWingDing); SetIndexStyle(0, DRAW_ARROW, myStyle, 1); SetIndexStyle(1, DRAW_ARROW, myStyle, 1); SetIndexStyle(2, DRAW_ARROW, myStyle, 1); SetIndexEmptyValue(0,0); SetIndexEmptyValue(1,0); SetIndexEmptyValue(2,0); return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int i, dayi, counted_bars = IndicatorCounted(); //---- check for possible errors if(counted_bars < 0) return(-1); //---- last counted bar will be recounted if(counted_bars > 0) counted_bars--; int limit = Bars - counted_bars; //---- for(i = limit - 1; i >= 0; i--) { if ( Point == 0.01 ) {xPrice = Close[i] - MathMod(Close[i],1.00) ; } else { xPrice = Close[i] - ( MathMod(100*Close[i],1.00)*0.01 ) ; } P1Buffer[i] = xPrice + Point*100; P2Buffer[i] = xPrice ; P3Buffer[i] = xPrice - Point*100; } // for return(0); } // start