CCI Divergence Detector
A technical analysis tool that identifies divergences between price action and the Commodity Channel Index (CCI) oscillator. Unlike standard divergence indicators, this system employs advanced gradient visualization, multi-layer wave effects, and comprehensive customization options to provide traders with crystal-clear divergence signals and market momentum insights.
Core Detection Mechanism
CCI-Based Analysis: The indicator utilizes the Commodity Channel Index as its primary oscillator, calculated from user-configurable source data (default: HLC3) with adjustable length parameters. The CCI provides reliable momentum readings that effectively highlight price-momentum divergences.
Dynamic Pivot Detection: The system employs adaptive pivot detection with three sensitivity levels (High/Normal/Low) to identify significant highs and lows in both price and CCI values. This dynamic approach ensures optimal divergence detection across different market conditions and timeframes.
Dual Divergence Analysis:
Regular Bullish Divergences: Detected when price makes lower lows while CCI makes higher lows, indicating potential upward reversal
Regular Bearish Divergences: Identified when price makes higher highs while CCI makes lower highs, signaling potential downward reversal
Strength Classification System: Each detected divergence is automatically classified into three strength categories (Weak/Moderate/Strong) based on:
-Price differential magnitude
-CCI differential magnitude
-Time duration between pivot points
-User-configurable strength multiplier
Advanced Visual System
Multi-Layer Wave Effects: The indicator features a revolutionary wave visualization system that creates depth through multiple gradient layers around the CCI line. The wave width dynamically adjusts based on ATR volatility, providing intuitive visual feedback about market conditions.
Professional Color Gradient System: Nine independent color inputs control every visual aspect:
Bullish Colors (Light/Medium/Dark): Control oversold areas, wave effects, and strong bullish signals
Bearish Colors (Light/Medium/Dark): Manage overbought zones, wave fills, and strong bearish signals
Neutral Colors (Light/Medium/Dark): Handle table elements, zero line, and transitional states
Intelligent Color Mapping: Colors automatically adapt based on CCI values:
Overbought territory (>100): Bearish color gradients with increasing intensity
Neutral positive (0 to 100): Blend from neutral to bearish tones
Oversold territory (<-100): Bullish color gradients with increasing intensity
Neutral negative (-100 to 0): Transition from neutral to bullish tones
Key Features & Components
Advanced Configuration System: Eight organized input groups provide granular control:
General Settings: System enable, pivot length, confidence thresholds
Oscillator Selection: CCI parameters, overbought/oversold levels, normalization options
Detection Parameters: Divergence types, minimum strength requirements
Sensitivity Tuning: Pivot sensitivity, divergence threshold, confirmation bars
Visual System: Line thickness, labels, backgrounds, table display
Wave Effects: Dynamic width, volatility response, layer count, glow effects
Transparency Controls: Independent transparency for all visual elements
Smoothing & Filtering: CCI smoothing types, noise filtering, wave smoothing
Professional Alert System: Comprehensive alert functionality with dynamic messages including:
-Divergence type and strength classification
-Current CCI value and confidence percentage
-Customizable alert frequency and conditions
Enhanced Information Table: Real-time display showing:
-Current CCI length and value
-Market status (Overbought/Normal/Oversold)
-Active sensitivity setting
Configurable table positioning (4 corner options)
Visual Elements Explained
Primary CCI Line: Main oscillator plot with gradient coloring that reflects market momentum and CCI intensity. Line thickness is user-configurable (1-8 pixels).
Wave Effect Layers: Multi-layer gradient fills creating a dynamic wave around the
CCI line:
-Outer layers provide broad market context
-Inner layers highlight immediate momentum
-Core layers show precise CCI movement
-All layers respond to volatility and momentum changes
Divergence Lines & Labels:
-Solid lines connecting divergence pivot points
-Color-coded based on divergence type and strength
-Labels displaying divergence type and strength classification
-Customizable transparency and size options
Reference Lines:
-Zero line with neutral color coding
-Overbought level (default: 100) with bearish coloring
-Oversold level (default: -100) with bullish coloring
Background Gradient: Optional background coloring that reflects CCI intensity and market conditions with user-controlled transparency (80-99%).
Configuration Options
Sensitivity Controls:
Pivot sensitivity: High/Normal/Low detection levels
Divergence threshold: 0.1-2.0 sensitivity range
Confirmation bars: 1-5 bar confirmation requirement
Strength multiplier: 0.1-3.0 calculation adjustment
Visual Customization:
Line transparency: 0-90% for main elements
Wave transparency: 0-95% for fill effects
Background transparency: 80-99% for subtle background
Label transparency: 0-50% for text elements
Glow transparency: 50-95% for glow effects
Advanced Processing:
Five smoothing types: None/SMA/EMA/RMA/WMA
Noise filtering with adjustable threshold (0.1-10.0)
CCI normalization for enhanced gradient scaling
Dynamic wave width with ATR-based volatility response
Interpretation Guidelines
Divergence Signals:
Strong divergences: High-confidence reversal signals requiring immediate attention
Moderate divergences: Reliable signals suitable for most trading strategies
Weak divergences: Early warning signals best combined with additional confirmation
Wave Intensity: Wave width and color intensity provide real-time volatility and momentum feedback. Wider, more intense waves indicate higher market volatility and stronger momentum.
Color Transitions: Smooth color transitions between bullish, neutral, and bearish states help identify market regime changes and momentum shifts.
CCI Levels: Traditional overbought (>100) and oversold (<-100) levels remain relevant, but the gradient system provides more nuanced momentum reading between these extremes.
Technical Specifications
Compatible Timeframes: All timeframes supported
Maximum Labels: 500 (for divergence marking)
Maximum Lines: 500 (for divergence drawing)
Pine Script Version: v5 (latest optimization)
Overlay Mode: False (separate pane indicator)
Usage Recommendations
This indicator works best when:
-Combined with price action analysis and support/resistance levels
-Used across multiple timeframes for confirmation
-Integrated with proper risk management protocols
-Applied in trending markets for divergence-based reversal signals
-Utilized with other technical indicators for comprehensive analysis
Risk Disclaimer: Trading involves substantial risk of loss. This indicator is provided for analytical purposes only and does not constitute financial advice. Divergence signals, while powerful, are not guaranteed to predict future price movements. Past performance is not indicative of future results. Always use proper risk management and never trade with capital you cannot afford to lose.
Ccidivergence
HTC peppermint_07 CCI w signal + s&r RSI
This CCI version enhances the traditional Commodity Channel Index (CCI) by integrating a dynamically calculated Relative Strength Index (RSI) that acts as support and resistance as shown in the screenshot, it can add as a confirmation to the divergence found in the CCI.
Key Features:
Enhanced CCI: The primary plot (black line but customizable) represents the standard CCI, providing insight into price momentum and potential overbought/oversold conditions.
Dynamic RSI Support/Resistance: The upper and lower bands (medium cyan line) are derived from a smoothed RSI, dynamically adjusting to the current market volatility. These bands serve as potential support and resistance levels for the CCI as additional confirmation for the divergence.
Overbought/Oversold Zones: The traditional overbought (+100) and oversold (-100) levels for CCI are marked with horizontal dotted lines.
Benefits:
Improved Entry/Exit Signals: Combining CCI with dynamic RSI support/resistance may offer more precise trading signals compared to using CCI alone.
Dynamic Adaptation: The RSI-based bands adapt to changing market conditions, potentially providing more relevant support and resistance levels.
Divergence Confirmation: dynamic s&r RSI adds confluence to potential trend reversals identified by the CCI.
Potential Usage:
Traders might use this indicator to:
Identify potential overbought/oversold conditions using the CCI and its relationship to the dynamic RSI bands.
Look for breakouts beyond the dynamic support/resistance levels as potential entry points.
Confirm potential trend reversals using RSI divergence (cyan and red label above divergence) signals.
Further Development Considerations:
Customizable Parameters: Allowing users to adjust the CCI length, RSI periods, and smoothing factors would enhance flexibility.
Alert Conditions: Adding alerts for breakouts, overbought/oversold conditions, and divergence signals would improve usability.
Backtesting: Thoroughly backtesting the indicator's performance across different assets and timeframes is essential before using it for live trading.
DISCLAIMER: !!
indicator is a custom technical analysis tool designed for educational and informational purposes only. It should not be construed as financial advice or a recommendation to buy or sell any security. Trading involves substantial risk of loss and may not be suitable for all investors.
Key Points to Consider:
No Guarantee of Profitability: The indicator's past performance is not indicative of future results. No trading strategy can guarantee profits or eliminate the risk of losses. You could lose some or all of your investment.
Use at Your Own Risk: Use of this indicator is solely at your own discretion and risk. You are responsible for your trading decisions. The developers and distributors of this indicator are not liable for any losses incurred as a result of using it.
Not Financial Advice: This indicator does not provide financial advice. Consult with a qualified financial advisor before making any investment decisions.
Backtesting Limitations: Backtested results, if presented, should be viewed with caution. Past performance may not reflect future results due to various factors, including changing market conditions and the limitations of backtesting methodologies.
Indicator Limitations: Technical indicators, including this one, are not perfect. They can generate false signals, and their effectiveness can vary depending on market conditions and the specific parameters used.
Parameter Optimization: Optimizing indicator parameters for past performance can lead to overfitting, which may not translate to future profitability.
No Warranty: The indicator is provided "as is" without any warranty of any kind, either express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, or non-infringement.
Changes and Updates: The developers may make changes or updates to the indicator without notice.
By using the "HTC peppermint_07 CCI w signal + s&r RSI" indicator, you acknowledge and agree to the terms of this disclaimer. If you do not agree with these terms, do not use the indicator.
Fisherized CCIIntroduction
This here is a non-repainting indicator where I use inverse Fisher transformation and smoothing on the well-known CCI (Commdity Channel Index) momentum indicator.
"The Inverse Fisher Transform" describes the calculation and use of the inverse Fisher transform by Dr . Ehlers in 2004. The transform is applied to any indicator with a known probability distribution function. It enables to transform an indicator signal into the range between +1 and -1. This can help to eliminate the noise of an indicator.
The CCI is an momentum indicator which describes the distance of the price to the average price.
For smoothing I used the Hann Window and NET (Noise Elimination Technique) methods.
Additional Features
Divergence Analysis
Trend-adaptive Histogram
Timeframe selection
Usage
It is usually used to spot potential trend reverals or mean-reversion (against the trend) trades on lower timeframes. IMO it can be even used to spot trend-following trades. It always depends on which settings you have, which timeframe do you use and which indicators you combine with it.
The suggested timeframe for this indicator is 15 min (with the length setting on 50).
The histogram with adaptive mode enabled could be used as filter applied on the buy and sell signals.
The divergence analysis can help to spot additional entries/exits or confirm the buy and sell signals.
Always try to find the best settings! This indicators has a lot of customization options you should take advantage of.
Signals
The indicator uses the following logic to generate the buy and sell signals:
Normal
Buy -> When CCI and MA go above the top band (usually +100) and cross
Sell -> When CCI and MA go below the the bottom band (usually -100) and cross
Fisherized
Buy -> When CCI and MA go above the the zero line and cross
Sell -> When CCI and MA go below the the zero line and cross
Have fun with the indicator! I am open for feedback and questions. :)
Strength of Divergence Across Multiple IndicatorsOverview:
One-stop shop for all your divergence needs, including:
(1) A single metric for divergence strength across multiple indicators.
(2) Labels that make it easy to spot where the truly strong divergence is by showing the overall divergence strength value along with the number of divergent indicators. Hovering over the label shows a breakdown of each divergent indicator and its individual divergence strength value.
(3) Fully customizable, including inputs for pivot lengths, divergence types, and weights for every component of the divergence strength calculation. This allows you to quickly and easily optimize the output for any chart. Don't worry, the default settings will have you covered if you're not interested in what's going on under the hood.
The Divergence Strength Calculation:
The total divergence strength value is the sum of the divergence strengths of all indicators for which divergence was detected at a given bar. Each indicator's individual divergence strength is comprised of two basic components: (1) |ΔPrice| - the magnitude of the change in price over the divergence period (pivot-to-pivot), and (2) |ΔIndicator| - the magnitude of the change in indicator value over the divergence period.
Because different indicators' scales and volatility can vary greatly, the Δ values are expressed in terms of standard deviation to ensure that the values are meaningful and equitable across all indicators and assets/instruments/currency pairs, etc:
|ΔIndicator| = |indicator_value_1 - indicator_value_2| / 2 * StDev(indicator_series,100)
Calculation Weights:
All components of the calculation are weighted and can be modified on the Inputs page in settings (weights are simply multipliers). For example, if you think hidden divergence should carry less weight than regular divergence, you can assign it a lesser weight. Or if you think RSI divergence is worth more than OBV divergence, you can adjust their weights accordingly. List of weights:
Regular divergence weight - default = 1
Hidden divergence weight - default = 1
ΔPrice weight - default = 0.5 (multiplied by the ΔPrice component)
ΔIndicator weight - default = 1.5 (multiplied by the ΔIndicator component)
RSI weight - default = 1.1
OBV weight - default = 0.8
MACD weight - default = 0.9
STOCH weight - default = 0.9
Development for additional indicators is ongoing, as is research into the optimal weight configuration(s).
Other Inputs:
Pivot lengths - specify the number of bars before and after each pivot high/low to consider it a valid candidate for divergence.
Lookback bars and Lookback pivots - specify the number of bars or the number of pivots to look back across.
Price sources - specify separate price sources for bullish and bearish divergence
Display settings - specify how lines and labels should display, including which divergence strength values should show the largest labels. Include/exclude specific divergence types and indicators.
Please report any bugs, or let me know if you have any enhancement suggestions or requests for additional indicators.
@reees
Bogdan Ciocoiu - Code runnerDescription
The Code Runner is a hybrid indicator that leverages other pre-configured, integrated open-source algorithms to help traders spot regular and continuation divergences.
The Code Runner specialises in integrating some of the most popular oscillators well known for their accuracy when scalping using divergence strategies.
Uniqueness
The Code Runner stands out as a one-stop-shop pack of oscillator algorithms that traders can further customise to spot divergences.
The indicator's uniqueness stands from its capability to recast each algorithm to apply to the same scale. This feature is achieved by manually adjusting the outputs of each algorithm to fit on a scale between +100 and -100.
Another benefit of the Code Runner comes from its standardisation of outputs, mainly consisting of lines. Showing lines enables traders to draw potential regular and continuation divergences quickly.
The indicator has been pre-configured to support scalping at 1-5 minutes.
Open-source
The Code Runner uses the following open-source scripts and algorithms:
www.tradingview.com
www.tradingview.com
www.tradingview.com
www.tradingview.com
www.tradingview.com
www.tradingview.com
www.tradingview.com
www.tradingview.com
These algorithms are available in the public domain either in TradingView space or outside (given their popularity in the financial markets industry).
Bogdan Ciocoiu - MoonshotDescription
Moonshot is an indicator that encapsulates the value delivered by the TSI, MACD, Awesome Oscillator and CCI algorithms to produce signals to enable users to enter positions in ideal market conditions. Moonshot integrates the value delivered by the above four algorithms into one script.
This indicator is particularly useful when trading continuation/reversal divergence strategies.
Uniqueness
The Moonshot's uniqueness stands from integrating the above algorithms into the same visual area and leveraging preconfigured parameters suitable for 1-3 minute scalping techniques.
In addition, Moonshot allows swapping or furthermore configuring the above four algorithms in such a way to align signals by colour-coding or shape thickness to aid the users with identifying any emerging patterns quicker.
Furthermore, Moonshot's uniqueness is also reflected in the way it has standardised the outputs of each algorithm to look and feel the same (including the scale at which the shapes are shown) and, in doing so, enables users to plug them in/out as needed.
Open-source
The indicator leverages the following open-source scripts/algorithms:
www.tradingview.com
www.tradingview.com
www.tradingview.com
www.tradingview.com