indicator · on price · open source
Recent High Low indicator
Recent High Low is a free open-source indicator by @deepwick. Recent high/low channel — the highest high and lowest low over a rolling window. Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Recent High Low does
Recent high/low channel — the highest high and lowest low over a rolling window. Acts as a quick range filter for breakouts and mean-reversion.
- A short lookback (5–10) catches local extremes; a long one (50+) gives a structural channel.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Recent High Low", overlay=true)
len = input.int(20, "Lookback length", minval=2, maxval=200)
colorDown = input.color("color.red", "Color Down")
colorUp = input.color("color.green", "Color Up")
rh = ta.highest(high, len)
rl = ta.lowest(low, len)
p_Recent_High = plot(rh, "Recent High", color=colorDown, style=plot.style_linebr)
p_Recent_Low = plot(rl, "Recent Low", color=colorUp, style=plot.style_linebr)
alertcondition(ta.crossover(close, rh), "Break above high", "Close broke above the rolling high")
alertcondition(ta.crossunder(close, rl), "Break below low", "Close broke below the rolling low")
No comments yet.
Sign in to comment.