OPEN-SOURCE SCRIPT
[blackcat] L1 Divergence of CCI for BS Signal

█ OVERVIEW
This indicator identifies potential market reversal points by detecting CCI (Commodity Channel Index) divergence patterns combined with extreme oversold/overbought conditions. It generates clear Buy and Sell signals with visual labels, helping traders spot high-probability entry and exit opportunities.
█ CONCEPTS
This indicator utilizes CCI divergence analysis to identify potential trend reversals.
Key principles:
• Bullish Divergence: Price makes a new low while CCI fails to make a corresponding new low, suggesting weakening downward momentum and potential reversal upward
• Bearish Divergence: Price makes a new high while CCI fails to make a corresponding new high, indicating weakening upward momentum and potential reversal downward
• Extreme Level Confirmation: Signals are filtered by requiring CCI to reach extreme levels (-150/-200 for buys, +150/+200 for sells) to ensure high-quality setups
█ HOW TO USE
1 — Add the indicator to your chart from the indicators menu
2 — Configure the CCI period and divergence detection parameters based on your trading style
3 — Wait for "B" (Buy) or "S" (Sell) labels to appear on the indicator panel
4 — Use divergence lines and auxiliary signals for additional confirmation
Input Parameters
• CCI Period: The lookback period for CCI calculation (default: 14)
• Oversold Level: The threshold below which indicates oversold conditions (default: -100)
• Overbought Level: The threshold above which indicates overbought conditions (default: +100)
• Extreme Oversold: The extreme oversold threshold for signal confirmation (default: -200)
• Extreme Overbought: The extreme overbought threshold for signal confirmation (default: +200)
• Divergence Detection Period: Lookback period for identifying CCI highs/lows (default: 20)
• Price New Low Detection Period: Lookback period for identifying price extremes (default: 50)
█ SIGNALS
Visual Elements
• "B" Label (Blue): Buy signal - Bullish divergence detected with CCI in oversold territory and prior extreme oversold confirmation
• "S" Label (Orange): Sell signal - Bearish divergence detected with CCI in overbought territory and prior extreme overbought confirmation
• ↑ Arrow (Green): Bullish divergence marker appearing in oversold zone
• ↓ Arrow (Red): Bearish divergence marker appearing in overbought zone
• ★ Star (Aqua/Orange): CCI crossing above oversold line or below overbought line
• ● Dot (Lime/Red): CCI crossing above or below zero axis
• Divergence Lines: Green lines connect bullish divergence points; Red lines connect bearish divergence points
CCI Visualization
• Red Line: CCI value when rising
• Green Line: CCI value when falling
• Green Histogram: CCI above +100 (overbought zone)
• Red Histogram: CCI below -100 (oversold zone)
• Blue Histogram at +220: Buy signal strength indicator
• Orange Histogram at -220: Sell signal strength indicator
Zone Fills
• Blue Fill: Overbought zone (CCI > +100)
• Red Fill: Oversold zone (CCI < -100)
• Dark Red Fill: Extreme overbought danger zone (CCI > +200)
• Dark Green Fill: Extreme oversold opportunity zone (CCI < -200)
█ ALERT CONDITIONS
The indicator includes built-in alert conditions for:
• Buy Signal: Triggered when bullish divergence buy signal appears
• Sell Signal: Triggered when bearish divergence sell signal appears
• Cross Above Oversold: CCI crosses above the oversold level
• Cross Below Overbought: CCI crosses below the overbought level
• Bullish Divergence: Any bullish divergence pattern detected
• Bearish Divergence: Any bearish divergence pattern detected
█ LIMITATIONS
• Divergence signals may produce false positives during strong trending markets
• Signals should be used in conjunction with other technical analysis tools
• Past performance does not guarantee future results
• Best suited for ranging or reversing markets rather than strong trends
• The profit percentage display is for reference only and tracks from the most recent buy signal
█ NOTES
• This indicator works best on timeframes from 15 minutes to daily charts
• Consider using support/resistance levels for additional confirmation
• The "B" and "S" signals represent the highest probability setups with multiple confirmations
• Auxiliary signals (stars and dots) provide earlier warnings but may be less reliable
═════════════════════════════════════════════════════════════════════════
For questions or feedback, use comments section below.
This indicator identifies potential market reversal points by detecting CCI (Commodity Channel Index) divergence patterns combined with extreme oversold/overbought conditions. It generates clear Buy and Sell signals with visual labels, helping traders spot high-probability entry and exit opportunities.
█ CONCEPTS
This indicator utilizes CCI divergence analysis to identify potential trend reversals.
Key principles:
• Bullish Divergence: Price makes a new low while CCI fails to make a corresponding new low, suggesting weakening downward momentum and potential reversal upward
• Bearish Divergence: Price makes a new high while CCI fails to make a corresponding new high, indicating weakening upward momentum and potential reversal downward
• Extreme Level Confirmation: Signals are filtered by requiring CCI to reach extreme levels (-150/-200 for buys, +150/+200 for sells) to ensure high-quality setups
█ HOW TO USE
1 — Add the indicator to your chart from the indicators menu
2 — Configure the CCI period and divergence detection parameters based on your trading style
3 — Wait for "B" (Buy) or "S" (Sell) labels to appear on the indicator panel
4 — Use divergence lines and auxiliary signals for additional confirmation
Input Parameters
• CCI Period: The lookback period for CCI calculation (default: 14)
• Oversold Level: The threshold below which indicates oversold conditions (default: -100)
• Overbought Level: The threshold above which indicates overbought conditions (default: +100)
• Extreme Oversold: The extreme oversold threshold for signal confirmation (default: -200)
• Extreme Overbought: The extreme overbought threshold for signal confirmation (default: +200)
• Divergence Detection Period: Lookback period for identifying CCI highs/lows (default: 20)
• Price New Low Detection Period: Lookback period for identifying price extremes (default: 50)
█ SIGNALS
Visual Elements
• "B" Label (Blue): Buy signal - Bullish divergence detected with CCI in oversold territory and prior extreme oversold confirmation
• "S" Label (Orange): Sell signal - Bearish divergence detected with CCI in overbought territory and prior extreme overbought confirmation
• ↑ Arrow (Green): Bullish divergence marker appearing in oversold zone
• ↓ Arrow (Red): Bearish divergence marker appearing in overbought zone
• ★ Star (Aqua/Orange): CCI crossing above oversold line or below overbought line
• ● Dot (Lime/Red): CCI crossing above or below zero axis
• Divergence Lines: Green lines connect bullish divergence points; Red lines connect bearish divergence points
CCI Visualization
• Red Line: CCI value when rising
• Green Line: CCI value when falling
• Green Histogram: CCI above +100 (overbought zone)
• Red Histogram: CCI below -100 (oversold zone)
• Blue Histogram at +220: Buy signal strength indicator
• Orange Histogram at -220: Sell signal strength indicator
Zone Fills
• Blue Fill: Overbought zone (CCI > +100)
• Red Fill: Oversold zone (CCI < -100)
• Dark Red Fill: Extreme overbought danger zone (CCI > +200)
• Dark Green Fill: Extreme oversold opportunity zone (CCI < -200)
█ ALERT CONDITIONS
The indicator includes built-in alert conditions for:
• Buy Signal: Triggered when bullish divergence buy signal appears
• Sell Signal: Triggered when bearish divergence sell signal appears
• Cross Above Oversold: CCI crosses above the oversold level
• Cross Below Overbought: CCI crosses below the overbought level
• Bullish Divergence: Any bullish divergence pattern detected
• Bearish Divergence: Any bearish divergence pattern detected
█ LIMITATIONS
• Divergence signals may produce false positives during strong trending markets
• Signals should be used in conjunction with other technical analysis tools
• Past performance does not guarantee future results
• Best suited for ranging or reversing markets rather than strong trends
• The profit percentage display is for reference only and tracks from the most recent buy signal
█ NOTES
• This indicator works best on timeframes from 15 minutes to daily charts
• Consider using support/resistance levels for additional confirmation
• The "B" and "S" signals represent the highest probability setups with multiple confirmations
• Auxiliary signals (stars and dots) provide earlier warnings but may be less reliable
═════════════════════════════════════════════════════════════════════════
For questions or feedback, use comments section below.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Avoid losing contact!Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq 防止失联,请立即行动,加入本猫聊天群: discord.com/invite/ZTGpQJq
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Avoid losing contact!Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq 防止失联,请立即行动,加入本猫聊天群: discord.com/invite/ZTGpQJq
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.