Trailing stop

 

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,

 
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.
 
You can use fixed to in together with trailing SL.examples are available in mt4 terminal