My EA makes buy or sell orders according to the trend. Orders are executed on different indicator data but it allways follows the trend. Have small TP and big SL.
The problem is that if the trend goes from an uptrend to a down trend or the other way around, there are allways orders left open that goes into SL and I loose money because of the big SL.
Cant change the SL to smaller value, because this is the way the EA works.
Is there a good way to close all open buy orders if a trend changes to the downside?
And close all open sell orders if the trend changes to the upside?
Im no master in coding but I managed to create the trend following in the EA with some help from mrtools.
Would be very greatfull if somebody could help me with the close order code Im looking for.
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.
My EA makes buy or sell orders according to the trend. Orders are executed on different indicator data but it allways follows the trend. Have small TP and big SL.
The problem is that if the trend goes from an uptrend to a down trend or the other way around, there are allways orders left open that goes into SL and I loose money because of the big SL.
Cant change the SL to smaller value, because this is the way the EA works.
Is there a good way to close all open buy orders if a trend changes to the downside?
And close all open sell orders if the trend changes to the upside?
Im no master in coding but I managed to create the trend following in the EA with some help from mrtools.
Would be very greatfull if somebody could help me with the close order code Im looking for.
//Thomas