arrow draw only one time why???

 

hi guys  i try to create a indicator , if  exist some condition must underline a candle  with arrow  and send me allert, but underline work only one time  and  allert work correctly  this is my  code 

if(Candel2>MinCandeLong && Close[CandelPosition1]<Open[CandelPosition1] && Close[CandelPosition2]>Open[CandelPosition2] && High[CandelPosition1]>High[CandelPosition2] && Close[CandelPosition1]<High[CandelPosition1])
     {
      
      if(TimeStamp!=Time[0])
        {
         Alert("Allert ",Symbol());
         //AlertCount= 1;

         TimeStamp=Time[0];
        }
        
      ObjectCreate("signal",OBJ_TEXT,0,Time[CandelPosition1],High[CandelPosition1]+20*Point);
      ObjectSetText("signal",CharToStr(234),14,"Wingdings",Color_HS);
      //return(0);
     }

whats wrong??  i find  a condition in candel 0 and  1

thankz at all

 

I suspect that the call to `ObjectCreate` fails the second time, because an object with the same name already exists.

You could try to add the current time to the name of the object.

Generally it is a good idea to check the return value of functions like ObjectCreate or ObjectSetText.

 
thankz  is corretc :)
Reason: