indicator · own pane · open source
Higher High Lower Low Counter indicator
Higher High Lower Low Counter is a free open-source indicator. HH/LL Counter counts how many bars have passed since the last confirmed higher high… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Higher High Lower Low Counter does
HH/LL Counter counts how many bars have passed since the last confirmed higher high (positive) and lower low (negative). Trend continuation while both counters are climbing.
- A higher-high streak + a deeper LL streak usually resolves with a strong breakout.
- Symmetric positive/negative reads = trend exhaustion.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Higher High Lower Low Counter", overlay=false)
len = input.int(5, "Swing Strength", minval=2, maxval=200)
colorUp = input.color("color.green", "Color Up")
colorDown = input.color("color.red", "Color Down")
colorNeutral = input.color("color.gray", "Color Neutral")
hh = ta.pivothigh(high, len, len)
ll = ta.pivotlow(low, len, len)
cumH = ta.barssince(not na(hh))
cumL = ta.barssince(not na(ll))
hline(0, "Zero", color=colorNeutral, linestyle=hline.style_dashed)
p_Bars_Since_HH = plot(cumH, "Bars Since HH", color=colorUp, style=plot.style_columns, linewidth=2)
p_Bars_Since_LL = plot(-cumL, "Bars Since LL", color=colorDown, style=plot.style_columns, linewidth=2)
alertcondition(not na(hh), "New swing high", "Higher-high confirmed")
alertcondition(not na(ll), "New swing low", "Lower-low confirmed")
No comments yet.
Sign in to comment.