Removing Arrows or Xs etc from the Chart

 
I am using an EA that places arrows on the screen--which indicate buys orders--and an indicator which places some yellow Xs on the screen as well. My problem is, how can I remove these. Once I remove the EA and the indicator, these arrows and Xs remain on the chart. They are a special kind of arrow. If I place my mouse over them, a message pops up, telling me the order number, buy limit, and price.
Thanks
Steve
 
Steve you have to go to Charts-Objects-Object List or just type CTRL B.
Then select all Objects you want to delete (cleck on first one, press Shift, click on last one) and choose delete.

You can also delete them onto the Chart : Double click on the arrow or Xs then press Delete on the keyboard.

Francois
 
when you create your objects use a function like follows:

void SetArrow(datetime time1, double price1, ... other parms ...)
{
static int objcount;
 
objcount++;
 
ObjectCreate("myepxertobject"+objcount,....);
 
....
 
}

(by the way fine and about the only use of the keyword static that I can think of).
this will ensure that all your objects start with same name

then insert in deinit()

   if(UninitializeReason()!=REASON_RECOMPILE)
      DeleteAllObjects();

(if recompiling while expert is working it will not delete arrows).
deleteallobjects function looks something like this:

void DeleteAllObjects()
{
   string objname;
   string ident="myexpertobject";
   int cnt=0;
   while(cnt<ObjectsTotal())
   {
      objname=ObjectName(cnt);
      if(StringSubstr(objname,0,StringLen(ident))==ident)
         ObjectDelete(objname);
      else
         cnt++;
   }
}




Reason: