lrc11239
Member
Hello All,
Would someone be able to convert a Chande Kroll Stop from TradingView to TOS? Many thanks in advance!
Would someone be able to convert a Chande Kroll Stop from TradingView to TOS? Many thanks in advance!
Code:
//@version=4
study(title = "Chande Kroll Stop", overlay=true, resolution="")
p = input(10, minval=1)
x = input(1, minval=1)
q = input(9, minval=1)
first_high_stop = highest(high, p) - x * atr(p)
first_low_stop = lowest(low, p) + x * atr(p)
stop_short = highest(first_high_stop, q)
stop_long = lowest(first_low_stop, q)
plot(stop_long, color=color.green)
plot(stop_short, color=color.red)