Error 150 - FIFO

 

Can someone please help me navigate this issue, I am testing my order placement script. The following trades take place in one script:


Sell 10000 units.

Sell 15000 units.

Net Position is Short 25000 units.

Close 5000 of above units.

Attempt to close 5000 more units, but get FIFO error.

Attempt to close 7000 units, same FIFO error.

Attempt to close 8000 units, same error.


What is the cause and remedy of these errors?

 
Have a read of this it may help: https://www.mql5.com/en/forum/123595
 
Thanks, this looks very promising!
Reason: