Examples from help file and articles on this site recommend following procedure for iterating through active orders:
// write open orders
// Do something with selected order
What would happen if somebody else (e.g. EA on another Symbol) opens or closes order while program is in the middle of the above loop?
Opening new orders is not that much problematic because new order will be at the end of the list, but when some order is closed, if positions are updated, it could happen that the above loop skips an order.
Do you check for such events in your code?
Only thing that I found is function GlobalVariableSetOnCondition()
To add comments, please log in or register