OPEN-SOURCE SCRIPT

Dual Keltner Channels

240
Dual Keltner Channels (DKC) Indicator 📊
🔹 About This Indicator
This indicator is an enhanced version of the original Keltner Channel available in TradingView. The Keltner Channel was initially designed as a volatility-based envelope around a moving average, helping traders identify trends, breakouts, and potential reversal zones.

💡 Original Creator: The Keltner Channel concept is based on the work of Chester W. Keltner and was later implemented in various trading platforms, including TradingView’s built-in Keltner Channel indicator.

This script builds upon the TradingView version of the Keltner Channel, adding:
✅ Dual Keltner Bands (Inner & Outer) for better trend and volatility analysis.
✅ Customizable Moving Averages (EMA/SMA) for flexibility.
✅ Multiple Band Calculation Methods (ATR, True Range, Range) for improved accuracy.
✅ Shaded Zones Between the Bands for enhanced visual clarity.

⚡ Credit: This indicator is an enhancement of the original Keltner Channel Indicator in TradingView. All improvements and modifications are made to provide deeper market insights while maintaining the core principles of the original Keltner concept.

🔹 Overview
The Dual Keltner Channels (DKC) indicator overlays two Keltner Channels on the price chart, helping traders spot trends, breakouts, and reversals with greater precision.

Inner Keltner Band (Multiplier 1): Captures normal price movements.
Outer Keltner Band (Multiplier 2): Highlights extreme price movements and potential breakouts.
🔹 Features & Inputs
📌 Main Inputs:
Keltner Channel Length: Defines the lookback period for the moving average calculation.
Source Price: Selects the price type (close, open, high, low) to calculate the bands.
Exponential Moving Average (EMA) Option: Choose between Exponential (EMA) or Simple (SMA) as the basis for calculations.
Bands Style: Selects how the volatility is measured:
Average True Range (ATR) (default)
True Range (TR)
Range (High - Low)
ATR Length: Determines the length of ATR calculations.
Enable Multiplier 1 & 2: Toggle to display/hide inner (multiplier 1) and outer (multiplier 2) bands.
📌 Keltner Channels Calculation:
Moving Average (MA): Uses either EMA or SMA for the midline.
Volatility Band Calculation:
Upper Band 1 (Inner Band): MA + (Multiplier 1 × Volatility Measure)
Lower Band 1 (Inner Band): MA - (Multiplier 1 × Volatility Measure)
Upper Band 2 (Outer Band): MA + (Multiplier 2 × Volatility Measure)
Lower Band 2 (Outer Band): MA - (Multiplier 2 × Volatility Measure)
📌 Visuals & Plotting:
Inner Bands (Multiplier 1): Blue upper & lower lines.
Outer Bands (Multiplier 2): Darker blue upper & lower lines.
Basis Line: White moving average.
Shaded Areas:
Between Upper 1 & Upper 2 (Light Brown Area): Identifies the upper Keltner region.
Between Lower 1 & Lower 2 (Light Brown Area): Identifies the lower Keltner region.
🔹 How to Use the Dual Keltner Channels Indicator
✅ 1. Trend Identification
Price above the upper outer band (Multiplier 2): Strong uptrend – potential continuation.
Price below the lower outer band (Multiplier 2): Strong downtrend – potential continuation.
Price within the inner bands (Multiplier 1): Sideways market – possible consolidation.
✅ 2. Breakout Trading
Break above outer upper band: Indicates a bullish breakout – consider long trades.
Break below outer lower band: Indicates a bearish breakdown – consider short trades.
✅ 3. Overbought & Oversold Conditions
Price touching/exceeding outer bands (Multiplier 2): Potential reversal zones.
Reversal confirmation: Look for candlestick patterns (e.g., Doji, Engulfing) or divergence signals.
✅ 4. Pullback & Entry Zones
Price bouncing from inner bands (Multiplier 1): Good re-entry point in trend direction.
Inner band as support/resistance: Helps in setting stop-loss and profit targets.
🔹 Effective Trading Strategies Using DKC
📌 1. Trend Following Strategy (Using Moving Average & Bands)
✅ Look for price staying above/below the basis line (MA) within the outer bands.
✅ Use pullbacks to the inner bands as re-entry points for trend continuation.
✅ Confirm trend strength with momentum indicators like RSI, MACD.

📌 2. Breakout Trading Strategy
✅ Identify a tight consolidation phase within the inner Keltner bands.
✅ Wait for a strong breakout beyond the outer bands.
✅ Enter long/short trades based on breakout direction.
✅ Place stop-loss at the previous inner band to manage risk.

📌 3. Reversal Strategy (Mean Reversion)
✅ When price extends beyond the outer band (Multiplier 2), look for reversal signals (candlestick patterns, RSI divergence).
✅ Enter counter-trend trades with tight stop-loss beyond the band.
✅ Target the moving average (basis line) as take-profit.

🔹 Final Thoughts 💡
The Dual Keltner Channels (DKC) is a powerful upgrade to the standard Keltner Channel, providing:
✅ Greater clarity on trend strength
✅ More precise breakout & reversal signals
✅ Better visual insights for dynamic market conditions

📌 Best Used With: RSI, MACD, Volume Profile, Price Action Signals.
📌 Works on: Stocks, Forex, Crypto, Commodities, Indices.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.