DeleteArrow Function

 

Hello,

actually iam coding some arrow indicator where i want the arrows to disappear live when conditions are not met and re-appear when conditions are met (on the current candle)

 

i have tried creating a function DeleteArrow() but something is wrong  , if anybody can post some example code would be very good thanks

 
DD:

Hello,

actually iam coding some arrow indicator where i want the arrows to disappear live when conditions are not met and re-appear when conditions are met (on the current candle)

 

i have tried creating a function DeleteArrow() but something is wrong  , if anybody can post some example code would be very good thanks

does the following right with you????

 

//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   ObjectsDeleteAll();
   Comment("");
}
 
Mohammad Soubra:

does the following right with you????

 

Soubra thanks for your help ,but what i want is that suppose the conditions are met and arrow appears (instantly)  however after few seconds the conditions are voided but the arrow is still over there , so basically i want to remove that arrow exactly when the conditions are voided and reappear when conditions are met , thanks.
 

Then you write the exact same but opposite logic with the activity that removes the arrow.

It could be the case that it then starts to continuously remove none existent arrows, so you have it scan for an arrow first and if it exist, remove it..

Also you can set all variables to zero, then the object exists, but will not be visible, and when you need it, assign the correct values so it shows up where you need it, and if it needs to go reset it to zero again.

Many solutions as you see.

 
Marco vd Heijden:

Then you write the exact same but opposite logic with the activity that removes the arrow.

It could be the case that it then starts to continuously remove none existent arrows, so you have it scan for an arrow first and if it exist, remove it..

Also you can set all variables to zero, then the object exists, but will not be visible, and when you need it, assign the correct values so it shows up where you need it, and if it needs to go reset it to zero again.

Many solutions as you see.

If you can show some example code , would be great to me , thanks
 
OK now it is fixed thanks :)
Reason: