• Welcome back! Thank you for being a part of this Traders Community. Let's discuss and share :)
    Selamat datang kembali! Trimakasih telah menjadi bagian dari Komunitas Trader ini. Mari berdiskusi dan berbagi :)

help me about trailing stop

ali.yar

Member
Credit Hunter
Credits
0
hi guys hope doing well

i wanna write a kind of logic that :
int trailingextra = 10;
if take profit >= trailingextra move stoploss to current price
please help me write it thank you
 
You can go through my code or use the logic: https://github.com/9nix6/Median-and...master/Include/AZ-INVEST/SDK/TradeManager.mqh

The trailing stop is used in the "Run" section of the EA via the function presented below:

Code:
tradeManager.Manage(_ticket, tradeManagerState);

The EA code is here:
https://github.com/9nix6/Median-and-Turbo-Renko-indicator-bundle/blob/master/Experts/Renko_EA.mq5
And the "Run" section is defined here:
https://github.com/9nix6/Median-and...bundle/blob/master/Experts/Renko_EA_Logic.mqh
 
hi guys hope doing well

i wanna write a kind of logic that :
int trailingextra = 10;
if take profit >= trailingextra move stoploss to current price
please help me write it thank you
how do we can move SL to current price. this will cause invalid stops (error code 130)
 
Back
Top