indicator · own pane · open source
Choppiness Index indicator
Choppiness Index is a free open-source indicator. Choppiness Index measures how trendless the market is on a 0-100 scale. Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Choppiness Index does
Choppiness Index measures how trendless the market is on a 0-100 scale. Below 38.2 = directional; above 61.8 = choppy / ranging.
- Use as a filter: trend systems work below 38.2, range systems work above 61.8.
- Climbs back into the chop zone after a trend = take profits or tighten stops.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Choppiness Index", overlay=false)
len = input.int(14, "Length", minval=2, maxval=200)
colorBg = input.color("color.purple", "Color Bg")
colorUp = input.color("color.green", "Color Up")
colorDown = input.color("color.red", "Color Down")
ci = 100 * math.log10(math.sum(ta.atr(1), len) / (ta.highest(high, len) - ta.lowest(low, len))) / math.log10(len)
hline(38.2, "Trending", color=colorUp, linestyle=hline.style_dashed)
hline(61.8, "Choppy", color=colorDown, linestyle=hline.style_dashed)
p_CI = plot(ci, "CI", color=colorBg, linewidth=2)
alertcondition(ta.crossunder(ci, 38.2), "Choppiness exits down", "Choppiness dropped below 38.2 — market is trending")
alertcondition(ta.crossover(ci, 61.8), "Choppiness enters up", "Choppiness crossed 61.8 — market is choppy")
No comments yet.
Sign in to comment.