Adding trailstop to script

J

Jompatan

New member
Hello, I want to do a trailstop but I am having trouble resetting the variable when the exit condition is met, which is that the close cross below the "Stop" value.

def Stop = if high * (0.98)> stop [1] then high * (0.98) else stop [1];
 
wtf_dude

wtf_dude

Active member
look at the code for the atr trailing stop that TOS has preloaded. Its a state change you have to code in. It's a bit of a pain.
 

Similar threads

Top