EA updates previous SL and TP when taking a new position on the same symbol (different lot sizes) with MT4
-
Why did you post your MT4 question in the MT5 EA section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum?
Next time post in the correct place. The moderators will likely move this thread there soon. - Different lot sizes have nothing to do with FIFO.
- Some brokers make all TP/SL the same (due to FIFO). Open one order and do partial closes.
William Roeder:
-
Why did you post your MT4 question in the MT5 EA section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum?
Next time post in the correct place. The moderators will likely move this thread there soon. - Different lot sizes have nothing to do with FIFO.
- Some brokers make all TP/SL the same (due to FIFO). Open one order and do partial closes.
- Sorry about that William, I didn't see an EA specific forum for MT4, so assumed it best fit here.
- Different lot sizes do get around fifo rules on some brokers. My Oanda account for instance allows for it.
- I just ran a test by hand on my IG account and can confirm that this is a broker issue, IG behaves as you describe. Thanks for pointing that out.
It seems I will need to move this particular EA to Oanda.
I will move your topic to the MQL4 and Metatrader 4 section.

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 am a US trader, so fifo applies.
Using MT4 with IG Broker (us).
Goal:
Issue:
Trade execution function:
I do not see any mention of my order being updated in the Journal:
2020.09.29 06:38:05.905 'x': order #98 buy 0.02 EURUSD.FX at 1.16704 closed due take-profit at price 1.17188
2020.09.29 06:38:05.905 'x': order #46 buy 0.01 EURUSD.FX at 1.16696 closed due take-profit at price 1.17188
2020.09.29 01:03:52.441 'x': order was opened : #98 buy 0.02 EURUSD.FX at 1.16704 sl: 1.16510 tp: 1.17188
2020.09.29 01:03:52.231 'x': instant order buy 0.02 EURUSD.FX at 1.16704 sl: 1.16510 tp: 1.17188
2020.09.28 23:00:22.939 'x': order was opened : #46 buy 0.01 EURUSD.FX at 1.16696 sl: 1.16521 tp: 1.17133
2020.09.28 23:00:22.710 'x': instant order buy 0.01 EURUSD.FX at 1.16696 sl: 1.16521 tp: 1.17133