OrderTicket() problem? - page 2

 
Hello ajw:

You are right. What it happens is open the position, then the EA closes it but then the closed ticket causes the error.


Regards

Gonzalo

It sounds like you are passing an incorrect ticket number to the OrderModify and OrderClose functions. The ticket you reference must be pending or open - closed tickets will cause an error. Try printing the ticket number you are about to modify or close and check the result in the journal against your current orders.

HTH,

Aaron.
Reason: