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.
When this code was created, MT5 probably only supported "netting" accounts, so an opposite trade would close it.
However, now there is a the "hedging" account type, and so an opposite order is opened instead of closing.
So, the code will have to modified to allow closing the trade.
When this code was created, MT5 probably only supported "netting" accounts, so an opposite trade would close it.
However, now there is a the "hedging" account type, and so an opposite order is opened instead of closing.
So, the code will have to modified to allow closing the trade.
Recommendations are against forum rules. You will have to do your own research.