This indicator combines the power of the Commodity Channel Index (CCI) with adaptive trend filters and divergence detection to identify high-probability trading opportunities. It's designed to reduce false signals by incorporating trend direction and divergence confirmation.
🔍 How It Works:
1. Trend Detection: - Uses an adaptive Simple Moving Average (SMA) that automatically adjusts between daily and weekly timeframes - Daily mode: Default 200 SMA for longer-term trend - Weekly mode: Default 40 SMA for broader market perspective - Trend direction is determined by comparing current SMA value to its previous value
2. CCI Component: - Traditional CCI calculation with customizable length (default: 20) - Adjustable overbought (default: +100) and oversold (default: -100) levels - Color-coded CCI line for quick visual reference: * Green: Overbought and rising * Red: Oversold and falling * Gray: Neutral zone
3. Signal Generation: - Buy Signal (Green Background): * CCI crosses above oversold level AND * Main trend is confirmed bullish (rising SMA) - Sell Signal (Red Background): * CCI crosses below overbought level AND * Main trend is confirmed bearish (falling SMA)
4. Divergence Detection: - Automatically identifies bullish and bearish divergences - Bullish Divergence: Price makes lower low while CCI makes higher low - Bearish Divergence: Price makes higher high while CCI makes lower high - Visualized with distinct markers on the CCI line - Can be used to set up alerts for divergence confirmations
⚙️ Customization Options: - CCI calculation length and price source - Overbought/Oversold levels - SMA lengths for daily and weekly modes - Divergence lookback period - Signal colors and visualization settings
🔔 Alert Capabilities: - Set alerts for CCI crossovers of overbought/oversold levels - Create divergence detection alerts - Configure trend change notifications - Combine multiple conditions for complex alert strategies
💡 Trading Tips: - Combine divergence signals with trend direction for better accuracy - Wait for signal confirmation before entering trades - Use additional indicators or price action for exit decisions
This indicator helps traders identify potential trend reversals while keeping them aligned with the main market trend. Perfect for both trend following and counter-trend strategies when used appropriately.
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.