1) the EA has to save the ticket number
2) the EA to delete this ticket number in case the EA closes it.
3) If this ticket number 'disappers' (OrdersTotal()) or OrderClose() creates an Error (most probable):
4108 |
ERR_INVALID_TICKET |
Invalid ticket |
you the EA should know it has been closed by someone or something (STP,TGT) else.
4108 | ERR_INVALID_TICKET | Invalid ticket |
Ticket numbers never disappear, they only move from active list to the history list. If a pending order is deleted, or an open order is closed (by what ever reason) it is in the history list. If you select by valid ticket you will get the order.
So its no possible.. I think it should be implemented, could have its functionality!
Greetings
BeLikewater
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
How to differientate if a position has been closed by an user manually or by the EA logic?
Is this possible?
Greetings
BeLikewater