Download MetaTrader 5

Trailing stop

To add comments, please log in or register
Rene Noteborn
216
Rene Noteborn  

Hallo,

Can someone help me with a trailingstop code in MQL4? Currently im adjusting my order with evey tick that goes in the desired direction of my trade. What I am looking for is a way to keep the trailingstop in the EA without adjusting it on every tick, once the stop is hit than close the order inmediately.

Thanks,

Stuart Browne
6182
Stuart Browne  
renenrla:

Hallo,

Can someone help me with a trailingstop code in MQL4? Currently im adjusting my order with evey tick that goes in the desired direction of my trade. What I am looking for is a way to keep the trailingstop in the EA without adjusting it on every tick, once the stop is hit than close the order inmediately.

Thanks,

Hi

So do you already have code that is adjusting the Trail Stop or are you using the MT4 built in Trail Stop? If you have it in code, then rather than sending an OrderModify() every tick it moves into profit, just hold the value in a variable. Once the price hits that level, close the order.
Namthanduan Kahmei
178
Namthanduan Kahmei  
You can use fixed to in together with trailing SL.examples are available in mt4 terminal
To add comments, please log in or register