My code so far:
//+------------------------------------------------------------------+ //| //| //+------------------------------------------------------------------+ #property copyright "" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Tomato #property indicator_color2 SpringGreen //---- input parameters bool Alert_On=false; int CountBars=99999999; //---- buffers double val1[]; double val2[]; #define SIGNAL_BAR 1 //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicator line IndicatorBuffers(2); SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,2); SetIndexArrow(1,241); SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,2); SetIndexArrow(0,242); SetIndexBuffer(0,val1); SetIndexBuffer(1,val2); //---- return(0); } //+------------------------------------------------------------------+ //| AltrTrend_Signal_v2_2 | //+------------------------------------------------------------------+ int start() { static datetime bar_time=0; if(Time[0]==bar_time) return(0); bar_time=Time[0]; if(CountBars>=Bars) CountBars=Bars; SetIndexDrawBegin(0,Bars-CountBars); SetIndexDrawBegin(1,Bars-CountBars); int i,shift,counted_bars=IndicatorCounted(); //---- check for possible errors if(counted_bars<0) return(-1); //---- initial zero if(counted_bars<1) { for(i=1;i<=CountBars;i++) val1[CountBars-i]=0.0; for(i=1;i<=CountBars;i++) val2[CountBars-i]=0.0; } for(shift=CountBars; shift>0; shift--) { double buy=iCustom(Symbol(),0,"Reversal 0000",0,shift); double sell=iCustom(Symbol(),0,"Reversal 0000",1,shift); if(buy !=0) { val1[shift]=Low[shift]+1000*Point; if(shift==1 && Alert_On); } if(sell!=0) { val2[shift]=High[shift]-1000*Point; if(shift==1 && Alert_On); } } return(0); }
The result:

I need indicator which shows arrows at the same time when blue and red dots appear.