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 for your work.

Why don't you collect the features of similar Expert Advisors as a library or other, and users would then use/include them in their main Expert Advisors that trade independently. - these are just thoughts in the ear.

Regards,

 
Izzatilla Ikramov:

Thank you for your work.

Why don't you collect the features of similar Expert Advisors as a library or other, and users would then use/incorporate them into their main Expert Advisors that trade independently. - these are just thoughts in the ear.

With respect,

That's why I didn't combine the breakeven and trawl functions in the code itself. For clarity and maybe someone will want to use them separately.
 
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. 

 

Could you please advise me on the EA settings so that when profit reaches 150p, trawl is switched on and trawled every 35 pips?

thanks in advance!

 
тарас:

Could you please advise me on the EA settings so that when profit reaches 150p, trawl is switched on and trawled every 35 pips?

thank you in advance!

trailing
plus points: 185
trailing step: 35

Then as soon as the price passes 185 pips, the sl (when moving) will be 150 pips away from the price.


If you want sl (when moving) to be 115 pips away from the price, then the distance to the price should be set to 150:

trailing
plus points: 150
trailing step: 35
 

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

 
I have set magik -1, but trades opened by EA are not accompanied, only opened manually. Why can this be so, maybe I have misunderstood something?
 
AVAAR:
I have set magik -1, but trades opened by the Expert Advisor are not accompanied, only trades opened manually. Why can this be so, maybe I have misunderstood something?

There is no error in the code, I checked. At -1, all magics should be accompanied. Can't your EA move stop loss back?