I am running a system in MT4 using an EA. I am looking at the possibility of moving to a broker with MT5 (offering much better spreads) but i dont think it is possible to re-create the EA to run on MT5.
The bit i am worried about is the order management. The EA will open Long only or Short only depending on certain criteria. Every time it gets a signal to enter it enters a new position at the specified lot size (so it may have several orders open on a particular instrument in the same direction). MT4 treats all these separately but doesnt MT5 treat it as an overall position? When it gets a close signal it loops the open orders and only closes those at a profit. It does this every time it gets a close signal so profits per order are variable.
I have read a bit about FIFO and MT5 aggregating positions and cant seem to find any way to close orders individually in MQL5. Can i do this or is there a way around it.