indicator · on price · open source
Gann HiLo Activator indicator
Gann HiLo Activator is a free open-source indicator by @deepwick. Gann HiLo Activator switches its value between yesterday's low (uptrend) and yesterday's… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Gann HiLo Activator does
Gann HiLo Activator switches its value between yesterday's low (uptrend) and yesterday's high (downtrend) based on where the SMA of close sits. A clean trailing-stop line.
- Long when the line is below price and the SMA is rising; short when above and falling.
- Used by Gann followers as both entry trigger and trailing exit.
- Pair with a longer-term trend filter for swing trades.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Gann HiLo Activator", overlay=true)
len = input.int(10, "SMA Length", minval=2, maxval=200)
colorUp = input.color("color.green", "Color Up")
colorDown = input.color("color.red", "Color Down")
sma = ta.sma(close, len)
hilo = close > sma ? low : high
hilo := close > sma[1] ? low : (close < sma[1] ? high : hilo[1])
p_HiLo_Activator = plot(hilo, "HiLo Activator", color=close > sma ? colorUp : colorDown, linewidth=2)
alertcondition(ta.crossover(close, hilo), "Price above HiLo", "Close crossed above the HiLo activator")
alertcondition(ta.crossunder(close, hilo), "Price below HiLo", "Close crossed below the HiLo activator")
No comments yet.
Sign in to comment.