MT5 Trailing Stop: When/how do they activate? / EA Recommendations

 

Hello friends,

Somewhat new to MT5 (and this forum!) and so far so good. My trading involves primarily placing pending orders: Buy Stop (Long) and Sell Stop (Short) orders, often with a Trailing Stop Loss, and I'm using a continuously running VPS session.

For some reason when I place a trailing SL using MT5's built in trailing stop function (i.e. set how many custom points I'd like it to trail by); on many of these pending orders they don't seem to activate when the trades are elected. I do understand the terminal must be open at all times. I've had one successful trailing SL activate and, tracing steps back to see how it activated, it appears to have activated when I changed the trailing SL settings after the order was elected / open.

Does this mean trailing SL's only work if they're placed after a trade is open i.e. elected?

If this is the case, I'd be grateful for any recommendations on an EA or approach for a trailing SL that can be applied at the pending order stage and activates / runs when the trade is elected, automatically.

Thanks for any thoughts!

Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Order Properties - Trade Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
chaneljre: I'd be grateful for any recommendations on an EA or approach for a trailing SL that can be applied at the pending order stage and activates / runs when the trade is elected, automatically.

You can either look at the Codebase if something free already exists, or in the Market for paid products (also sometimes free).

However, recommendations or suggestions for Market products are not allowed on the forum, so you will have to do your own research.

Finally, you also have the option to hire a programmer in the Freelance section.

 

Just a follow-up to this thread (for any future searchers), after some further testing it appears for Pending Orders that the native MT5 Trailing Stop Loss function only activates once the trade is elected / open - so if you set a pending order, and then apply a trailing stop loss to that pending order ahead of it being potentially elected / open, it won't get activated automatically and you'll need to apply / set it once the trade is open (happy to be corrected if I've missed something someone else has found - but this is what my testing has shown me thus far).

So I'll have to look for some alternate scripts / solutions to allow me to place the Trailing Stop at the time of placing the pending order and ensures that it remains active if the trade is elected.