I'm coding an EA using pending orders. At a given time, I could have 2 or 3 buy orders opened and a pending sell order. The level where the pending sell order should be opened is used as a stoploss for all the opened buy orders.
The problem is that it tries to open the sell order before the buy orders are closed and it gives an error because hedging is not allowed.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi,
I'm coding an EA using pending orders. At a given time, I could have 2 or 3 buy orders opened and a pending sell order. The level where the pending sell order should be opened is used as a stoploss for all the opened buy orders.
The problem is that it tries to open the sell order before the buy orders are closed and it gives an error because hedging is not allowed.
Is there a solution for this problem?