Double Commodity Channel Index - DCCI | TR🎯 Overview
Double Commodity Channel Index - DCCI | TR is an advanced oscillator developed by Tiagorocha1989 that enhances the classic Commodity Channel Index (CCI) by applying the CCI formula twice. This “double CCI” approach amplifies trend signals, reduces lag, and helps traders identify acceleration, deceleration, and potential turning points earlier than traditional CCI. With dual‑mode operation (zero‑line or moving‑average crossovers), an extensive selection of moving average types, and comprehensive visual customization, DCCI provides a powerful tool for momentum and reversal analysis.
🔧 How It Works
The standard CCI measures the current price level relative to an average price over a given period, normalized by the mean deviation. Double CCI applies this same logic to the CCI values themselves, creating a “momentum of momentum” effect that highlights changes in the underlying CCI’s behaviour.
Core Calculation Logic:
First CCI:
CCI = (Typical Price - SMA of Typical Price) / (0.015 × Mean Deviation)
where the period is user‑defined Length DCCI and the source is Source DCCI.
Double CCI (DCCI):
DCCI = 2 × CCI - ta.cci(CCI, Length_DCCI)
i.e., the current CCI minus the CCI of CCI (applied to the CCI series) and then doubled, effectively smoothing and amplifying changes in CCI.
Reference Line (Entry_DCCI):
The indicator compares DCCI to a reference line that can be either:
Zero Line (classic mode) – signals occur when DCCI crosses above or below zero.
DCCI MA (enhanced mode) – the reference line becomes a moving average of DCCI itself, providing smoother, filtered signals.
The moving average type and length are fully customizable, with support for 12 different MA variants (see Key Features).
The resulting oscillator oscillates around the chosen reference line:
DCCI above reference → upward acceleration in CCI (bullish momentum)
DCCI below reference → downward acceleration in CCI (bearish momentum)
Magnitude indicates the strength of the acceleration. Values above/below the traditional ±100 or ±200 levels often signal strong momentum, but DCCI is unbounded.
✨ Key Features
🔹 Dual Operating Modes
Zero Line Mode: Classic signals when DCCI crosses above or below zero – simple and intuitive.
DCCI MA Mode: Smoother signals when DCCI crosses its own moving average – reduces whipsaws in choppy markets.
🔹 Extensive Moving Average Selection
Choose from 12 MA types for the DCCI MA line, each with its own characteristics:
EMA, SMA, RMA, WMA, VWMA, HMA, DEMA, TEMA, TRIMA, FRAMA, SWMA, T3.
The T3 MA includes an adjustable T3 Factor for fine‑tuning smoothness.
🔹 Customizable CCI Parameters
Length DCCI: Lookback period for both CCI calculations (default 55).
Source DCCI: Price source for the first CCI (default Close).
(The typical price used in CCI is internally derived from high, low, close.)
🔹 Extended Range Visualization
Gradient fills are drawn between DCCI and the reference line, with fixed bounds at +300 and -300. These zones help visualise extreme readings, referencing classic CCI overbought/oversold levels while accommodating DCCI’s unbounded nature.
🔹 Customizable Color Themes
Eight distinct color schemes to match your chart aesthetics:
Classic, Modern, Robust, Accented, Monochrome, Moderate, Aqua, Cosmic
Each theme defines separate colors for bullish and bearish states.
🔹 Comprehensive Visual Feedback
Colored DCCI Line: Changes colour based on its position relative to the reference line.
Signal Line: Yellow line representing the zero or MA reference.
Gradient Fill Zones: Semi‑transparent fills showing extreme momentum areas (overbought/oversold zones).
Dynamic Zone Fills: Additional fill between DCCI and the reference line, coloured by the prevailing bias.
Color‑Coded Candles: Bars reflect the current DCCI bias (above or below reference).
Signal Markers: Triangle up/down symbols at crossover points.
Live Value Display: Current DCCI value shown in a floating label near the last bar.
Trend Table: Bullish/Bearish status displayed in a table on the chart.
🔹 Ready‑to‑Use Alerts
Built‑in alert conditions trigger LONG when the DCCI is above the reference line (bullish bias) and SHORT when below the reference line (bearish bias), for both operating modes.
⚙️ Settings Summary
Setting Description Default
Color Choice Select from eight visual themes Classic
Length DCCI Lookback period for both CCI calculations 55
Source DCCI Price source for the first CCI Close
Entry/Exit Signal Choose between zero‑line or DCCI MA mode 0
Length MA Moving average period for DCCI MA mode 365
Moving Average Type of moving average for the signal line (12 options) EMA
T3 Factor Factor for T3 moving average (0–1) 0.7
📈 Practical Applications
🔹 Trend Acceleration Detection
The slope and position of DCCI relative to the reference line quickly reveal whether CCI momentum is accelerating or decelerating. Steeply rising DCCI indicates bullish acceleration; steeply falling DCCI signals bearish acceleration.
🔹 Zero‑Line Crossovers
In Zero Line mode, crossovers provide clear signals:
Crossover above zero → bullish acceleration, potential trend reversal up.
Crossunder below zero → bearish acceleration, potential trend reversal down.
🔹 Signal‑Line Crossovers
In DCCI MA mode, crossovers between DCCI and its moving average generate filtered signals:
DCCI crosses above its MA → bullish signal.
DCCI crosses below its MA → bearish signal.
These signals work well in trending markets by reducing false entries.
🔹 Overbought / Oversold Conditions
Although DCCI is unbounded, traditional CCI levels (e.g., +100, -100, +200, -200) can be referenced. Extreme DCCI readings (above +300 or below -300) often coincide with strong momentum and may precede reversals or pullbacks.
🔹 Divergence Trading
Double CCI is excellent for spotting divergences:
Bullish Divergence: Price makes a lower low while DCCI forms a higher low → possible upside reversal.
Bearish Divergence: Price makes a higher high while DCCI forms a lower high → possible downside reversal.
Divergences are most reliable after extended trends or when DCCI is at extreme levels.
🔹 Momentum Confirmation
The magnitude of DCCI confirms trend strength:
Large positive values → strong bullish acceleration.
Large negative values → strong bearish acceleration.
Values nearing the reference line → momentum slowing, potential trend change.
🔹 Centerline Rejections
When DCCI approaches the reference line (zero or MA) but reverses before crossing, it can signal trend continuation – a common pattern in strong trends.
🔹 Multiple Timeframe Analysis
Compare DCCI readings across timeframes: higher‑timeframe DCCI defines the primary trend, while lower‑timeframe DCCI helps pinpoint entry and exit timing.
🎯 Ideal For
✅ CCI Enthusiasts looking for a more responsive, smoothed version of the classic indicator.
✅ Trend Traders seeking confirmation of trend strength and direction.
✅ Momentum Traders wanting an early view of acceleration and deceleration.
✅ Divergence Traders looking for leading reversal signals.
✅ Swing Traders capturing medium‑term momentum shifts.
✅ System Developers needing a robust, customisable crossover‑based strategy.
✅ Beginner Traders who appreciate clear visual signals and multiple learning modes.
📌 Key Takeaways
Double CCI Logic: Applying the CCI formula twice amplifies trend signals and reduces lag compared to standard CCI.
Dual‑Mode Flexibility: Choose zero‑line simplicity for clear entries or MA‑smoothed signals for filtered trades.
Unbounded Nature: DCCI has no fixed upper/lower limits, making it suitable for strongly trending instruments; traditional levels (e.g., ±100, ±200, ±300) serve as useful reference zones.
Extensive MA Options: 12 moving average types give you complete control over the smoothness and responsiveness of the signal line.
Rich Visuals: Colour themes, gradient fills for extreme zones, candle colouring, and live value labels provide immediate market context.
Divergence Capability: The double calculation often reveals divergences earlier than simple CCI.
Alert‑Ready: Pre‑built alerts for both LONG and SHORT signals based on bias.
⚠️ Important Notes
Because DCCI is unbounded, its scale can vary significantly between instruments and timeframes. The gradient fills at ±300 are arbitrary reference points derived from classic CCI overbought/oversold levels; they may not represent actual extreme conditions for all instruments.
The default Length DCCI of 55 offers a medium‑term perspective. Shorter lengths (e.g., 20) produce more responsive signals, while longer lengths (e.g., 100) are better for identifying major trends.
The default Length MA of 365 in DCCI MA mode is designed for a long‑term context on daily charts; adjust it to match your trading horizon.
Divergences are most reliable when they occur after extended trends and are confirmed by other tools.
Always combine Double CCI with proper risk management and additional confirmation before live deployment.
Disclaimer: This indicator is provided for educational and informational purposes only. Past performance does not guarantee future results. Always test thoroughly and align with your personal risk management strategy.
Indicateur Pine Script®






















