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
I'm writing an expert advisor and I want it to be FIFO compliant. Note that I can have various instances of the EA running on different pairs at the same time. Also, there could be various instances running on the same pair (on different charts), each with a different magic number.
When I need to close an order, I call "oldestTicket()" and close that order:
I am worried about when two orders were opened at the same time by the same instance, which would possibly trigger that condition: "(OrderOpenTime() == oldest && OrderTicket() < res)".
Also I'm not sure if it there is something I am missing.
Any clarification would be appreciated.
Thank you.