SandroTurriate

HiLo Activator

Going to try using it in combination with the ECO indicator.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study(title="HiLo Activator", overlay=true)
length = input(3, minval=1)
displace = input(0, minval=0)
highsma = sma(high, length)
lowsma = sma(low, length)
swing = iff(close > highsma[displace], 1, iff(close < lowsma[displace], -1, 0))
mah = highest(high, length)
mal = lowest(low, length)
stop = iff(swing==1, mal, iff(swing==-1, mah, stop[1]))
linecolor = iff(stop < low, green, red)
plot(stop, style=line, linewidth=2, color=linecolor)