my Arrows dont show up on right place after a while.

 

Hi,

 I have a small visual problem with my homemade Binary EA.

When i start the EA and the signals comes its all good arrows upear right where they should, but after as new bars comes the arrow start to change place.

Im using " #property indicator_buffers X " instead of " IndicatorBuffers(X) " and buffers them under Init() like this,

   SetIndexBuffer(0,arrow_dn);
   SetIndexArrow(0,arrowdncode);
   SetIndexLabel(0,label+" put signal");
   SetIndexStyle(0,DRAW_ARROW,NULL,arrowsize,arrowdncolor);

   SetIndexBuffer(1,arrow_up);
   SetIndexArrow(1,arrowupcode);
   SetIndexLabel(1,label+" call signal");
   SetIndexStyle(1,DRAW_ARROW,NULL,arrowsize,arrowupcolor);

 then after start() i dont use any bar counter.. i just plot em as normal like this,

      double gaparrow=arrowgap*iATR(NULL,PERIOD_CURRENT,20,1);
      double gaplabel=labelgap*iATR(NULL,PERIOD_CURRENT,20,1);

      if(signal==2){
         arrow_dn[0]=High[0]+gaparrow;
         drawlabel(getstratname(strat),High[0]+gaplabel);
      }
      if(signal==1){
         arrow_up[0]=Low[0]-gaparrow;
         drawlabel(getstratname(strat),Low[0]-gaplabel);
      }

 does anyone know why they dont show up on the right place? i think it has to do with the Bar history somehow but im not shure.

look at screen shot. 

Files:
arrow_error.png  192 kb
 
slicken:

Hi,

 I have a small visual problem with my homemade Binary EA.

When i start the EA and the signals comes its all good arrows upear right where they should, but after as new bars comes the arrow start to change place.

Im using " #property indicator_buffers X " instead of " IndicatorBuffers(X) " and buffers them under Init() like this,

 then after start() i dont use any bar counter.. i just plot em as normal like this,

 does anyone know why they dont show up on the right place? i think it has to do with the Bar history somehow but im not shure.

look at screen shot. 

Please show the all the relevant code if you need help.