Ticket# modified by OrderModify

 
Hi,

I have a ticket number returned by OrderSend in an EA. Let's say I save this number in a file. If I modify the order manually by closing some lots, the remaining lots have a different ticket number (the one that would be returned by OrderModify if it was done by an EA).
In my EA, if I later reread the ticket number from my file, I can't make the link between this number and the new one. How can I know that the remaining lots correspond to the previous ticket number ?

Thank you
 
You can set magic number to order and then analyze it.
 
You can set magic number to order and then analyze it.


Sorry I missed your answer. OK, your solution is good for EAs. Now let's say that I include in the problem some trades done manually. How can I handle them?
Thank you

Nicolas
 
Use script (You can assign hot key to your script) with manual confirmation. The same trading dialog box appears but you can previously assign any magic number
 
Can you just explicit a bit more ? What function should I use in a script to popup the new trade window ?

Use script (You can assign hot key to your script) with manual confirmation. The same trading dialog box appears but you can previously assign any magic number
 
OrderSend function and checked Manual confirmation in the script common properties
 
Thank you

OrderSend function and checked Manual confirmation in the script common properties
Reason: