Download MetaTrader 5
To add comments, please log in or register
Do you have questions to the application's developer - ask them in Comments section
Lee
613
Lee 2015.03.26 13:38 

Hello,

 

does anybody know if it is possible to code the stoploss of an EA so that it only is executed if certain other parameters are fulfilled.

To be exact I would like my s/l only be executed if bid and ask move into one direction to avoid stopouts due to an abrupt increase of spread into one direction.

 

Thank you

 

Lee 

Rodrigo Malacarne
Moderator
9599
Rodrigo Malacarne 2015.03.28 21:29  
f1b0lut10n:

Hello,

does anybody know if it is possible to code the stoploss of an EA so that it only is executed if certain other parameters are fulfilled.

To be exact I would like my s/l only be executed if bid and ask move into one direction to avoid stopouts due to an abrupt increase of spread into one direction.

Thank you

Lee 

Hello Lee (f1b0lut10n),

A stop loss is something "rigid"... once it's placed and price "touches" the SL level, it's always executed. So, either you develop a "logic" for placing the SL at the righ place, or you develop any other logic that "changes" SL (a trailing stop?) level while a set of other paremeters is fulfilled.

Anyway, it's perfectly possible to do that. Although it's not clear (at least for me) how, exactly, you want to implement this logic, everything you described can be accessed using MQL5.

Regards,
Malacarne

/
To add comments, please log in or register