Invalid ticket for order close function.

 

OrderClose(OrderTicket(),.....

Sometimes my EA cant close an order.

If the system has lost the ticket number, how can I close this order?

I need a function like CloseOpenOrder()

 
24hworker:

OrderClose(OrderTicket(),.....

Sometimes my EA cant close an order.

If the system has lost the ticket number, how can I close this order?

I need a function like CloseOpenOrder()

Did you select the order first ? show your code . . .
Reason: