I thought that it would be better with 4 functions.
One to manage the Trailingstop on winning buy trades, one to manage the Trailingstop on winning sell trades, one to manage the Stoploss on
losing Buy trades and one to manage the Stoploss on losing sell trades. Everything
seems to work fine except the Stoploss on losing Buy trades. Can someone please have alook and let me know what is wrong?
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.
I thought that it would be better with 4 functions. One to manage the Trailingstop on winning buy trades, one to manage the Trailingstop on winning sell trades, one to manage the Stoploss on losing Buy trades and one to manage the Stoploss on losing sell trades. Everything seems to work fine except the Stoploss on losing Buy trades. Can someone please have alook and let me know what is wrong?
The above didn't work either, so my latest attempt is as follows, but it doesn't work all the time: