Download MetaTrader 5
To add comments, please log in or register
Added support for the Spanish language. Come and check it out!
Juraj Ondrusek
405
Juraj Ondrusek 2015.09.10 21:06 

Hi, I need to help. Know anybody, how to delete object (TEXT_OBJECT with name=OrderTicket()), when that order is already closed?

EXAMPLE:

for(int z=OrdersTotal()-1; z>=0; z--)
{  int sel = OrderSelect(z, SELECT_BY_POS);
   string ticket = (string)OrderTicket();
   Object_Create(ticket);
}
............

When is order closed, object with name as ticket number must be deleted. Big thanks.

Billy Angdijaya
5204
Billy Angdijaya 2015.09.11 03:36  
Juraj Ondrusek:

Hi, I need to help. Know anybody, how to delete object (TEXT_OBJECT with name=OrderTicket()), when that order is already closed?

EXAMPLE:

for(int z=OrdersTotal()-1; z>=0; z--)
{  int sel = OrderSelect(z, SELECT_BY_POS);
   string ticket = (string)OrderTicket();
   Object_Create(ticket);
}
............

When is order closed, object with name as ticket number must be deleted. Big thanks.

is there any other object?

if not (it's the one and only object), you can use ObjectsDeleteAll.

Juraj Ondrusek
405
Juraj Ondrusek 2015.09.11 08:55  

Thanks, but Yes, there is more objects.

NOTE1: order is closed by me, not by EA

Juraj Ondrusek
405
Juraj Ondrusek 2015.09.11 10:49  
I solve it with use array. Thanks all for help.
Billy Angdijaya
5204
Billy Angdijaya 2015.09.12 04:14  
Juraj Ondrusek:
I solve it with use array. Thanks all for help.
good luck.
/
To add comments, please log in or register