OPEN-SOURCE SCRIPT

Super CCI By Baljit Aujla

The indicator you've shared is a custom CCI (Commodity Channel Index) with multiple types of Moving Averages (MA) and Divergence Detection. It is designed to help traders identify trends and reversals by combining the CCI with various MAs and detecting different types of divergences between the price and the CCI.

Key Components of the Indicator:
CCI (Commodity Channel Index):

The CCI is an oscillator that measures the deviation of the price from its average price over a specific period. It helps identify overbought and oversold conditions and the strength of a trend.
The CCI is calculated by subtracting a moving average (SMA) from the price and dividing by the average deviation from the SMA. The CCI values fluctuate above and below a zero centerline.
Multiple Moving Averages (MA):

The indicator allows you to choose from a variety of moving averages to smooth the CCI line and identify trend direction or support/resistance levels. The available types of MAs include:
SMA (Simple Moving Average)
EMA (Exponential Moving Average)
WMA (Weighted Moving Average)
HMA (Hull Moving Average)
RMA (Running Moving Average)
SMMA (Smoothed Moving Average)
TEMA (Triple Exponential Moving Average)
DEMA (Double Exponential Moving Average)
VWMA (Volume-Weighted Moving Average)
ZLEMA (Zero-Lag Exponential Moving Average)
You can select the type of MA to use with a specified length to help identify the trend direction or smooth out the CCI.
Divergence Detection:

The indicator includes a divergence detection mechanism to identify potential trend reversals. Divergences occur when the price and an oscillator like the CCI move in opposite directions, signaling a potential change in price momentum.
Four types of divergences are detected:
Bullish Divergence: Occurs when the price makes a lower low, but the CCI makes a higher low. This indicates a potential reversal to the upside.
Bearish Divergence: Occurs when the price makes a higher high, but the CCI makes a lower high. This indicates a potential reversal to the downside.
Hidden Bullish Divergence: Occurs when the price makes a higher low, but the CCI makes a lower low. This suggests a continuation of the uptrend.
Hidden Bearish Divergence: Occurs when the price makes a lower high, but the CCI makes a higher high. This suggests a continuation of the downtrend.
Each type of divergence is marked on the chart with arrows and labels to alert traders to potential trading opportunities. The labels include the divergence type (e.g., "Bull Div" for Bullish Divergence) and have customizable text colors.
Visual Representation:

The CCI and its associated moving average are plotted on the indicator panel below the price chart. The CCI is plotted as a line, and its color changes depending on whether it is above or below the moving average:
Green when the CCI is above the MA (indicating bullish momentum).
Red when the CCI is below the MA (indicating bearish momentum).
Horizontal lines are drawn at specific levels to help identify key CCI thresholds:
200 and -200 levels indicate extreme overbought or oversold conditions.
75 and -75 levels represent less extreme levels of overbought or oversold conditions.
The 0 level acts as a neutral or baseline level.
A background color fill between the 75 and -75 levels helps highlight the neutral zone.
Customization Options:

CCI Length: You can customize the length of the CCI, which determines the period over which the CCI is calculated.
MA Length: The length of the moving average applied to the CCI can also be adjusted.
MA Type: Choose from a variety of moving averages (SMA, EMA, WMA, etc.) to smooth the CCI.
Divergence Detection: The indicator automatically detects the four types of divergences (bullish, bearish, hidden bullish, hidden bearish) and visually marks them on the chart.
How to Use the Indicator:
Trend Identification: When the CCI is above the selected moving average, it suggests bullish momentum. When the CCI is below the moving average, it suggests bearish momentum.
Overbought/Oversold Conditions: The CCI values above 100 or below -100 indicate overbought and oversold conditions, respectively.
Divergence Analysis: The detection of bullish or bearish divergences can signal potential trend reversals. Hidden divergences may suggest trend continuation.
Trading Signals: You can use the divergence markers (arrows and labels) as potential buy or sell signals, depending on whether the divergence is bullish or bearish.
Practical Application:
This indicator is useful for traders who want to:

Combine the CCI with different moving averages for trend-following strategies.
Identify overbought and oversold conditions using the CCI.
Use divergence detection to anticipate potential trend reversals or continuations.
Have a highly customizable tool for various trading strategies, including trend trading, reversal trading, and divergence-based trading.
Overall, this is a comprehensive tool that combines multiple technical analysis techniques (CCI, moving averages, and divergence) in a single indicator, providing traders with a robust way to analyze price action and spot potential trading opportunities.
Commodity Channel Index (CCI)Moving AveragesTrend Analysis

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

チャートでこのスクリプトを利用したいですか?

免責事項