indicator · on price · open source

Keltner Channel indicator

Keltner Channel is a free open-source indicator by @deepwick. Keltner Channel uses an EMA of the typical price plus/minus an ATR envelope — smoother than… Deepwick Script runs a subset of Pine Script.

Deepwick · @deepwickv1Updated 3 Nov 2026▲ 0 users
Running…
Loading chart…

What Keltner Channel does

Keltner Channel uses an EMA of the typical price plus/minus an ATR envelope — smoother than Bollinger and a common trend filter.

  • Price above the upper rail = trend up; below the lower rail = trend down.
  • Channel width tracks ride regime; tight KC + BB squeeze = coiled spring.

Source code

Deepwick Script, a subset of Pine Script · read-only

//@version=6
indicator("Keltner Channel", overlay=true)
len = input.int(20, "Length", minval=2, maxval=200)
mult = input.float(2, "ATR multiplier", minval=0.1, maxval=5, step=0.1)
src = input.source(close, "Source")
colorMid = input.color("color.orange", "Color  Mid")
colorUp = input.color("color.green", "Color  Up")
[m, u, l] = ta.kc(src, len, mult)
p_KC_Mid = plot(m, "KC Mid", color=colorMid, linewidth=2)
p_KC_Upper = plot(u, "KC Upper", color=colorUp)
p_KC_Lower = plot(l, "KC Lower", color=colorUp)
fill(p_KC_Upper, p_KC_Lower, color=color.new(colorUp, 90))
alertcondition(ta.crossover(close, u), "Above upper rail", "Close crossed above the Keltner upper rail")
alertcondition(ta.crossunder(close, l), "Below lower rail", "Close crossed below the Keltner lower rail")

Comments

No comments yet.

Sign in to comment.