OPEN-SOURCE SCRIPT
Keltner Channels v1 [JopAlgo]

Keltner Channels v1 [JopAlgo] — a clean volatility envelope for timing pullbacks, breakouts, and risk
Keltner Channels are a moving-average centerline with volatility-based bands above and below. They give you a live “speed limit” for price: when the market is calm, bands are tight (expect mean reversion); when volatility expands, bands widen (trend moves can breathe). KC v1 [JopAlgo] keeps the classic idea but adds a small twist that traders appreciate in crypto: an adaptive centerline that switches between EMA and SMA based on trendiness, plus a choice of how you measure volatility for the bands.
This makes KC v1 useful for any timeframe—from fast scalps to multi-day swings—because it answers three practical questions on every chart:
Where’s the “middle” of price right now? (the centerline)
How far is “far” for current volatility? (the bands)
Should I fade back to the middle or ride with the expansion? (context from band width + slope)
If you attach screenshots to your script page, show one image labeling Upper / Middle / Lower bands with a classic pullback-to-middle entry, and another showing a band expansion where price hugs the outer band in trend.
What you’re seeing (and how it’s computed)
Middle band (MA):
KC v5 computes both an EMA and an SMA of your source (default close) with the same length, then auto-selects the middle band:
If ATR > SMA(ATR) over length, KC marks the market as trending and uses the EMA (faster, responsive).
Otherwise, it uses the SMA (steadier) in balance.
Result: you get a centerline that’s calm in chop and snappier in trend, without touching settings.
Upper / Lower bands:
upper = middle + (mult × volatility)
lower = middle - (mult × volatility)
You choose the volatility measure via Bands Style:
Average True Range (default): smooth, robust; uses ATR(atrlength). Best all-around choice.
True Range: raw TR each bar (more jumpy; reacts to gaps and spikes quickly).
Range: RMA of (high - low) over length (gentler; good for tight mean-reversion regimes).
Colors & fill:
Upper = red, Lower = green, Middle = white, with muted fill between bands so you can still read candles.
How to use Keltner Channels on any timeframe
Same framework everywhere: trade with the envelope when expanding, fade back to the middle when contracting—but only at objective locations and with healthy flow.
Scalping (1–5m)
Pullback-to-middle entry: In a micro-trend, wait for price to retrace to the middle band and print a hold. Enter with the trend, stop just beyond the opposite side of the middle or below minor structure; first target is the near band.
Band tap fades (only in contraction): When bands are tightening and the middle is flat, quick fades from upper → middle or lower → middle are high-probability if your volume/flow read doesn’t show aggressive pressure against you.
Avoid: Fading when bands expand and middle slopes—expect continuation instead.
Intraday (15m–1H)
Continuation rides: When bands open up (volatility expansion) and the middle slopes, price often walks the outer band. Enter on minor pullbacks that hold above the middle (for longs) and trail using the middle band or a structure stop.
Squeeze to break: A period of narrowing bands often precedes a move. Let price close outside the channel with good flow, then buy the retest toward the middle that holds.
Swing (2H–4H)
Trend participation: In established trends, treat pullbacks to the middle band as your primary entry. The upper/lower band is not a take-profit by itself—use it with Volume Profile targets (POC/HVNs) or key swing levels.
Mean reversion in balance: When the middle is flat and bands are tight over many bars, fade outer band → middle at Volume Profile edges, provided your flow read isn’t showing absorption against your idea.
Position (1D–1W)
Context: Use KC to judge regime (wide bands + slope = trend; tight/flat = balance). Position entries come from pullbacks to middle that coincide with Weekly AVWAP / VP value edges.
Entries, exits, and risk (simple rules)
Trend entry (with expansion):
Wait for band expansion + sloping middle in your direction. Enter on the first clean pullback to middle (or shallow pullback that can’t even tag middle).
Stop: below the middle band or just beyond local swing.
Trail: by the middle band in trend, or step-trail under pivots.
Targets: next Volume Profile HVN/POC or structural levels; the far Keltner band is a context line, not a hard TP.
Mean-reversion entry (in contraction):
Bands tight + flat middle → fade outer band back to middle at a Volume Profile VA edge.
Stop: just beyond the band.
Target: middle band (first), opposite band if flow remains weak.
Breakout confirmation:
A strong close outside the band by itself can be a trap. Treat it as signal only when your flow read confirms (see “Combining with other [JopAlgo] tools”).
Settings that actually matter (and how to tune them)
MA Length (default 20): controls both middle smoothness and the trending test (ATR vs SMA(ATR)).
Shorter (10–14) reacts faster, more whips in chop.
Longer (30–50) steadier middle, better for swings/position.
Multiplier (default 2.0): scales band distance.
Crypto majors: 1.8–2.2 is a good starting range on 15m–4H.
Volatile alts: 2.2–2.6 to avoid over-triggering.
If you keep getting faked out on fades: increase the multiplier.
If the channel rarely contains price for long stretches: decrease slightly.
Bands Style:
ATR for most use cases;
TR when you want maximum responsiveness to spikes;
Range for calmer envelopes in slow, balanced markets.
ATR Length (default 10): only applies if you choose ATR for band style.
Shorter = quicker band changes, good for scalps;
Longer = steadier bands for swings.
Note: KC v1 auto-selects EMA vs SMA for the middle band using the ATR trend test. That’s intentional, so you don’t have to toggle it manually.
What to look for (pattern cheatsheet)
Walk-the-band: In expansion, price hugs the outer band and barely returns to the middle—ride, don’t fade.
First touch of middle in trend: Often the cleanest add or first entry after a breakout.
Band pinch (“squeeze”): A long, narrow channel with flat middle sets up a breakout. Wait for acceptance (close outside + hold on retest).
False break tell: Price pokes outside band but closes back inside quickly—watch for reversion to middle, especially if your flow read shows Absorption against the poke.
Combining KC v1 with other [JopAlgo] tools
like the Cumulative Volume Delta v1 [JopAlgo] (CVDv1):
Do not chase an outside-band move if CVDv1 shows Absorption—that’s a classic failed break.
Prefer pullbacks to the middle band when Alignment = OK and Imbalance % is strong in your direction.
Reclaim setups: after a poke outside the band, a CVD divergence on the return through the middle often precedes a mean-reversion run.
Volume Profile v3.2 [JopAlgo]:
Use VAH/VAL/LVNs for location. A pullback-to-middle that coincides with VA boundary is A-tier.
Breakouts through LVNs with expanding bands tend to travel fast toward the next HVN/POC—good for continuation targets.
(A great screenshot: KC middle kiss at VAL with CVDv1 Efficient, then a move to POC.)
Common pitfalls KC v1 helps you avoid
Fading expansion: Trying to short the upper band when bands are widening and middle slopes up is how you get steamrolled. KC tells you it’s not that kind of day.
Chasing inside contraction: Buying every tiny outside poke while bands are pinched leads to whips. Let acceptance form; buy the retest to middle that holds.
Stops too tight: In trend, volatility is elevated; stops need to live beyond the middle or behind structure, not right at the band.
Practical defaults to start with
Length: 20
Multiplier: 2.0 (adjust ±0.2–0.4 per asset)
Bands Style: ATR
ATR Length: 10
Timeframes: works out of the box on 15m–4H; for 1–5m scalps, consider length=14; for daily swings, length=30.
Open source & disclaimer
This indicator is provided open source so traders can study, test, and adapt it to their workflow. No tool guarantees outcomes; risk management is essential.
Disclaimer — Not Financial Advice.
The “Keltner Channels v1 [JopAlgo]” indicator and this description are provided for educational purposes only and do not constitute financial or investment advice. Trading involves risk, including possible loss of capital. [JopAlgo] makes no warranties and assumes no responsibility for any trading decisions or outcomes resulting from the use of this script. Past performance is not indicative of future results.
Keltner Channels are a moving-average centerline with volatility-based bands above and below. They give you a live “speed limit” for price: when the market is calm, bands are tight (expect mean reversion); when volatility expands, bands widen (trend moves can breathe). KC v1 [JopAlgo] keeps the classic idea but adds a small twist that traders appreciate in crypto: an adaptive centerline that switches between EMA and SMA based on trendiness, plus a choice of how you measure volatility for the bands.
This makes KC v1 useful for any timeframe—from fast scalps to multi-day swings—because it answers three practical questions on every chart:
Where’s the “middle” of price right now? (the centerline)
How far is “far” for current volatility? (the bands)
Should I fade back to the middle or ride with the expansion? (context from band width + slope)
If you attach screenshots to your script page, show one image labeling Upper / Middle / Lower bands with a classic pullback-to-middle entry, and another showing a band expansion where price hugs the outer band in trend.
What you’re seeing (and how it’s computed)
Middle band (MA):
KC v5 computes both an EMA and an SMA of your source (default close) with the same length, then auto-selects the middle band:
If ATR > SMA(ATR) over length, KC marks the market as trending and uses the EMA (faster, responsive).
Otherwise, it uses the SMA (steadier) in balance.
Result: you get a centerline that’s calm in chop and snappier in trend, without touching settings.
Upper / Lower bands:
upper = middle + (mult × volatility)
lower = middle - (mult × volatility)
You choose the volatility measure via Bands Style:
Average True Range (default): smooth, robust; uses ATR(atrlength). Best all-around choice.
True Range: raw TR each bar (more jumpy; reacts to gaps and spikes quickly).
Range: RMA of (high - low) over length (gentler; good for tight mean-reversion regimes).
Colors & fill:
Upper = red, Lower = green, Middle = white, with muted fill between bands so you can still read candles.
How to use Keltner Channels on any timeframe
Same framework everywhere: trade with the envelope when expanding, fade back to the middle when contracting—but only at objective locations and with healthy flow.
Scalping (1–5m)
Pullback-to-middle entry: In a micro-trend, wait for price to retrace to the middle band and print a hold. Enter with the trend, stop just beyond the opposite side of the middle or below minor structure; first target is the near band.
Band tap fades (only in contraction): When bands are tightening and the middle is flat, quick fades from upper → middle or lower → middle are high-probability if your volume/flow read doesn’t show aggressive pressure against you.
Avoid: Fading when bands expand and middle slopes—expect continuation instead.
Intraday (15m–1H)
Continuation rides: When bands open up (volatility expansion) and the middle slopes, price often walks the outer band. Enter on minor pullbacks that hold above the middle (for longs) and trail using the middle band or a structure stop.
Squeeze to break: A period of narrowing bands often precedes a move. Let price close outside the channel with good flow, then buy the retest toward the middle that holds.
Swing (2H–4H)
Trend participation: In established trends, treat pullbacks to the middle band as your primary entry. The upper/lower band is not a take-profit by itself—use it with Volume Profile targets (POC/HVNs) or key swing levels.
Mean reversion in balance: When the middle is flat and bands are tight over many bars, fade outer band → middle at Volume Profile edges, provided your flow read isn’t showing absorption against your idea.
Position (1D–1W)
Context: Use KC to judge regime (wide bands + slope = trend; tight/flat = balance). Position entries come from pullbacks to middle that coincide with Weekly AVWAP / VP value edges.
Entries, exits, and risk (simple rules)
Trend entry (with expansion):
Wait for band expansion + sloping middle in your direction. Enter on the first clean pullback to middle (or shallow pullback that can’t even tag middle).
Stop: below the middle band or just beyond local swing.
Trail: by the middle band in trend, or step-trail under pivots.
Targets: next Volume Profile HVN/POC or structural levels; the far Keltner band is a context line, not a hard TP.
Mean-reversion entry (in contraction):
Bands tight + flat middle → fade outer band back to middle at a Volume Profile VA edge.
Stop: just beyond the band.
Target: middle band (first), opposite band if flow remains weak.
Breakout confirmation:
A strong close outside the band by itself can be a trap. Treat it as signal only when your flow read confirms (see “Combining with other [JopAlgo] tools”).
Settings that actually matter (and how to tune them)
MA Length (default 20): controls both middle smoothness and the trending test (ATR vs SMA(ATR)).
Shorter (10–14) reacts faster, more whips in chop.
Longer (30–50) steadier middle, better for swings/position.
Multiplier (default 2.0): scales band distance.
Crypto majors: 1.8–2.2 is a good starting range on 15m–4H.
Volatile alts: 2.2–2.6 to avoid over-triggering.
If you keep getting faked out on fades: increase the multiplier.
If the channel rarely contains price for long stretches: decrease slightly.
Bands Style:
ATR for most use cases;
TR when you want maximum responsiveness to spikes;
Range for calmer envelopes in slow, balanced markets.
ATR Length (default 10): only applies if you choose ATR for band style.
Shorter = quicker band changes, good for scalps;
Longer = steadier bands for swings.
Note: KC v1 auto-selects EMA vs SMA for the middle band using the ATR trend test. That’s intentional, so you don’t have to toggle it manually.
What to look for (pattern cheatsheet)
Walk-the-band: In expansion, price hugs the outer band and barely returns to the middle—ride, don’t fade.
First touch of middle in trend: Often the cleanest add or first entry after a breakout.
Band pinch (“squeeze”): A long, narrow channel with flat middle sets up a breakout. Wait for acceptance (close outside + hold on retest).
False break tell: Price pokes outside band but closes back inside quickly—watch for reversion to middle, especially if your flow read shows Absorption against the poke.
Combining KC v1 with other [JopAlgo] tools
like the Cumulative Volume Delta v1 [JopAlgo] (CVDv1):
Do not chase an outside-band move if CVDv1 shows Absorption—that’s a classic failed break.
Prefer pullbacks to the middle band when Alignment = OK and Imbalance % is strong in your direction.
Reclaim setups: after a poke outside the band, a CVD divergence on the return through the middle often precedes a mean-reversion run.
Volume Profile v3.2 [JopAlgo]:
Use VAH/VAL/LVNs for location. A pullback-to-middle that coincides with VA boundary is A-tier.
Breakouts through LVNs with expanding bands tend to travel fast toward the next HVN/POC—good for continuation targets.
(A great screenshot: KC middle kiss at VAL with CVDv1 Efficient, then a move to POC.)
Common pitfalls KC v1 helps you avoid
Fading expansion: Trying to short the upper band when bands are widening and middle slopes up is how you get steamrolled. KC tells you it’s not that kind of day.
Chasing inside contraction: Buying every tiny outside poke while bands are pinched leads to whips. Let acceptance form; buy the retest to middle that holds.
Stops too tight: In trend, volatility is elevated; stops need to live beyond the middle or behind structure, not right at the band.
Practical defaults to start with
Length: 20
Multiplier: 2.0 (adjust ±0.2–0.4 per asset)
Bands Style: ATR
ATR Length: 10
Timeframes: works out of the box on 15m–4H; for 1–5m scalps, consider length=14; for daily swings, length=30.
Open source & disclaimer
This indicator is provided open source so traders can study, test, and adapt it to their workflow. No tool guarantees outcomes; risk management is essential.
Disclaimer — Not Financial Advice.
The “Keltner Channels v1 [JopAlgo]” indicator and this description are provided for educational purposes only and do not constitute financial or investment advice. Trading involves risk, including possible loss of capital. [JopAlgo] makes no warranties and assumes no responsibility for any trading decisions or outcomes resulting from the use of this script. Past performance is not indicative of future results.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.