//+------------------------------------------------------------------+ //| test.mq4 | //+------------------------------------------------------------------+ #property copyright "Ron T" #property link "http://www.lightpatch.com" #property indicator_chart_window #property indicator_buffers 4 #property indicator_color1 White #property indicator_color2 Red #property indicator_color3 Red #property indicator_color4 White //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; double ExtMapBuffer4[]; // User Input extern double Gap_Size=0.0030; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //|------------------------------------------------------------------| int init() { SetIndexStyle(0,DRAW_ARROW); SetIndexBuffer(0, ExtMapBuffer1); SetIndexArrow(0,233); //up red SetIndexStyle(1,DRAW_ARROW); SetIndexBuffer(1, ExtMapBuffer2); SetIndexArrow(1,234); //down white SetIndexStyle(2,DRAW_ARROW); SetIndexBuffer(2, ExtMapBuffer3); SetIndexArrow(2,168); // Red SetIndexStyle(3,DRAW_ARROW); SetIndexBuffer(3, ExtMapBuffer4); SetIndexArrow(3,168); // White return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { int i; for( i=0; i=0) { oTYP0=(High[pos+0]+Low[pos+0]+Close[pos+0]+Close[pos+0])/4; oTYP1=(High[pos+1]+Low[pos+1]+Close[pos+1]+Close[pos+1])/4; oTYP2=(High[pos+2]+Low[pos+2]+Close[pos+2]+Close[pos+2])/4; // down trend if(oTYP2 > oTYP1 && oTYP1 > oTYP0) { ExtMapBuffer1[pos]=0; ExtMapBuffer2[pos]=oTYP0-0.0010; //down red } // up trend if(oTYP2 < oTYP1 && oTYP1 < oTYP0) { ExtMapBuffer1[pos]=oTYP0+0.0010; //up white ExtMapBuffer2[pos]=0; } pos--; } return(0); } //+------------------------------------------------------------------+