Experts: Exp_breakeven_trailing_SL

 

Exp_breakeven_trailing_SL:

The Expert Advisor transfers to break-even and/or trails positions on every currency pairs or only on the current one.

Parameters

Author: Oksana Berenko

 
Thank you, great code.
 
Rodrigo da Silva Boa:
Thank you, great code.
I'm glad.
 

Thanks,

It helped me also too! Coming from MT4, it was not so easy to code a Trailing Stop on MT5. 

 

this would be ideal for me, but i'm in mt4, does anyone have the mt4 version?

T‌hat would be very much appreciated. 

R‌egards kate

 
How do I get the code
Please?
 
michaelumana:
How do I get the code
Please?

https://www.mql5.com/en/code/14300

 

Hi, is this only work for one position/pair?

I opened 2 buy position but the trailing started to go back and forth like somekind of glitch.

 
How are you suppose to load this into MT5? What is the process?
 

This is a really good EA but as amrlsymlx noted it only works correctly with one pair.

That's because the modify trade call works off the symbol (which is not unique), when for multiple positions it needs to work off the ticket(which is unique).

Attached (see discussion) is a modified version which should work for multiple pairs. Have added comments to show the changes I made.