- You must count down when closing/deleting or in the presence of other EAs that can. Loops and Closing or Deleting Orders - MQL4 forum Get in the habbit.
- Filter by magic number and pair

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Examples from help file and articles on this site recommend following procedure for iterating through active orders:
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?
How?
Only thing that I found is function GlobalVariableSetOnCondition()