OPEN-SOURCE SCRIPT
Commodity Channel Index Trend | Dextra

Overview
A smart, noise-filtered CCI that transforms chaotic oscillations into clear trend states. Instead of flipping constantly, CCI Trend locks into bullish or bearish mode only when momentum truly breaks out — using hysteresis to eliminate false signals.
Instant visual feedback via fully colored candles:
- Emerald Green = Bullish trend locked
- Hot Pink = Bearish trend locked
How It Works
1. Calculates standard CCI using EMA and price deviation
2. Triggers trend only when CCI exits the neutral zone
3. Locks the state until CCI breaks the opposite threshold
4. Updates CCI line color and candle appearance in real time
A smart, noise-filtered CCI that transforms chaotic oscillations into clear trend states. Instead of flipping constantly, CCI Trend locks into bullish or bearish mode only when momentum truly breaks out — using hysteresis to eliminate false signals.
Instant visual feedback via fully colored candles:
- Emerald Green = Bullish trend locked
- Hot Pink = Bearish trend locked
How It Works
1. Calculates standard CCI using EMA and price deviation
2. Triggers trend only when CCI exits the neutral zone
3. Locks the state until CCI breaks the opposite threshold
4. Updates CCI line color and candle appearance in real time
Скрипт с открытым кодом
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Отказ от ответственности
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Скрипт с открытым кодом
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Отказ от ответственности
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.