OPEN-SOURCE SCRIPT
V/S Dual CCI Strategy Signal

Dual CCI Strategy Signal — TradingView Indicator Description (English)
Overview
This indicator generates buy/sell signals based on two independent CCI (Commodity Channel Index) indicators with customizable timeframes, smoothing methods, and filters.
The primary signal comes from CCI1 crossing its smoothed moving average (MA). Additional filters using overbought/oversold zones (for both CCI1 and CCI2) help reduce false signals and allow trading only when a recent momentum extreme occurred.
How it works
CCI1 (primary) – calculates CCI on its own timeframe (or current chart timeframe).
MA1 – smoothed version of CCI1 (SMA, EMA, WMA, etc.).
Signal – a crossover of CCI1 and MA1 gives a Long signal; a crossunder gives a Short signal.
Filters (optional):
CCI1 zone filter – requires that CCI1 touched the oversold zone (for Long) or overbought zone (for Short) within the last N bars (lookback).
CCI2 MA neutral zone filter – prevents trading when CCI2's smoothed MA is inside a defined neutral range (e.g., -100 to +100).
CCI2 zone filter – requires that CCI2 (not its MA) touched oversold/overbought levels within the last N bars.
All filters can be individually enabled/disabled. When disabled, the signal relies only on the CCI1/MA1 crossover.
Input Parameters
CCI1 (Primary)
Timeframe – timeframe for CCI1 calculation (leave empty to use chart timeframe).
Source – price source (default: hlc3).
Length – CCI period (default: 20).
MA Type – smoothing type for CCI1 (None, SMA, SMA + Bollinger Bands, EMA, SMMA (RMA), WMA, VWMA).
MA Length – length of the smoothing MA (default: 14).
BB StdDev – standard deviation multiplier for Bollinger Bands (if selected).
CCI2 (Higher TF / confirmation)
Timeframe – timeframe for CCI2 (e.g., 1D, 4H).
Source, Length, MA Type, MA Length, BB StdDev – same as for CCI1.
Filters
CCI1 zone filter
Lookback – number of bars (in CCI1's timeframe) to check for overbought/oversold touches.
Overbought / Oversold – levels (default: +100 / -100).
CCI2 MA neutral zone filter
Neutral Low / High – range where CCI2's MA blocks signals (default: -100 to +100).
CCI2 zone filter
Lookback – same as for CCI1 but applied to CCI2.
Overbought / Oversold – levels for CCI2 (default: +100 / -100).
Each filter has an enable checkbox.
Visual Output
Green triangle (L) – Long signal (CCI1 crosses above its MA and all enabled filters are satisfied).
Red triangle (S) – Short signal (CCI1 crosses below its MA and all enabled filters are satisfied).
Alerts – built-in alert conditions for Long and Short signals.
Note: This version does not plot CCI lines or bands to keep the chart clean. Only signals appear as arrows on the price chart.
Usage Tips
Set different timeframes – use CCI1 on a lower (entry) timeframe and CCI2 on a higher (trend) timeframe.
Adjust filter levels – if signals are too frequent, increase overbought/oversold values (e.g., +150/-150) or lengthen lookback.
Disable filters – to see pure CCI1/MA crossovers, uncheck all filter boxes.
Combine with price action – signals work best when confirmed by support/resistance or trend lines.
Example Configuration (from your screenshots)
CCI1: 1H timeframe, Length 9, MA Type SMA, MA Length 2
CCI2: 2H timeframe, Length 20, MA Type SMA
Filters: CCI1 zone ±180, lookback 50; CCI2 MA neutral zone -50..+50; CCI2 zone ±180, lookback 260
This gives rare, high‑confidence signals.
Alert Conditions
Dual CCI Long – triggered on a valid Long signal.
Dual CCI Short – triggered on a valid Short signal.
Happy trading!
Pine Script code included – copy, modify, and use at your own discretion.
Overview
This indicator generates buy/sell signals based on two independent CCI (Commodity Channel Index) indicators with customizable timeframes, smoothing methods, and filters.
The primary signal comes from CCI1 crossing its smoothed moving average (MA). Additional filters using overbought/oversold zones (for both CCI1 and CCI2) help reduce false signals and allow trading only when a recent momentum extreme occurred.
How it works
CCI1 (primary) – calculates CCI on its own timeframe (or current chart timeframe).
MA1 – smoothed version of CCI1 (SMA, EMA, WMA, etc.).
Signal – a crossover of CCI1 and MA1 gives a Long signal; a crossunder gives a Short signal.
Filters (optional):
CCI1 zone filter – requires that CCI1 touched the oversold zone (for Long) or overbought zone (for Short) within the last N bars (lookback).
CCI2 MA neutral zone filter – prevents trading when CCI2's smoothed MA is inside a defined neutral range (e.g., -100 to +100).
CCI2 zone filter – requires that CCI2 (not its MA) touched oversold/overbought levels within the last N bars.
All filters can be individually enabled/disabled. When disabled, the signal relies only on the CCI1/MA1 crossover.
Input Parameters
CCI1 (Primary)
Timeframe – timeframe for CCI1 calculation (leave empty to use chart timeframe).
Source – price source (default: hlc3).
Length – CCI period (default: 20).
MA Type – smoothing type for CCI1 (None, SMA, SMA + Bollinger Bands, EMA, SMMA (RMA), WMA, VWMA).
MA Length – length of the smoothing MA (default: 14).
BB StdDev – standard deviation multiplier for Bollinger Bands (if selected).
CCI2 (Higher TF / confirmation)
Timeframe – timeframe for CCI2 (e.g., 1D, 4H).
Source, Length, MA Type, MA Length, BB StdDev – same as for CCI1.
Filters
CCI1 zone filter
Lookback – number of bars (in CCI1's timeframe) to check for overbought/oversold touches.
Overbought / Oversold – levels (default: +100 / -100).
CCI2 MA neutral zone filter
Neutral Low / High – range where CCI2's MA blocks signals (default: -100 to +100).
CCI2 zone filter
Lookback – same as for CCI1 but applied to CCI2.
Overbought / Oversold – levels for CCI2 (default: +100 / -100).
Each filter has an enable checkbox.
Visual Output
Green triangle (L) – Long signal (CCI1 crosses above its MA and all enabled filters are satisfied).
Red triangle (S) – Short signal (CCI1 crosses below its MA and all enabled filters are satisfied).
Alerts – built-in alert conditions for Long and Short signals.
Note: This version does not plot CCI lines or bands to keep the chart clean. Only signals appear as arrows on the price chart.
Usage Tips
Set different timeframes – use CCI1 on a lower (entry) timeframe and CCI2 on a higher (trend) timeframe.
Adjust filter levels – if signals are too frequent, increase overbought/oversold values (e.g., +150/-150) or lengthen lookback.
Disable filters – to see pure CCI1/MA crossovers, uncheck all filter boxes.
Combine with price action – signals work best when confirmed by support/resistance or trend lines.
Example Configuration (from your screenshots)
CCI1: 1H timeframe, Length 9, MA Type SMA, MA Length 2
CCI2: 2H timeframe, Length 20, MA Type SMA
Filters: CCI1 zone ±180, lookback 50; CCI2 MA neutral zone -50..+50; CCI2 zone ±180, lookback 260
This gives rare, high‑confidence signals.
Alert Conditions
Dual CCI Long – triggered on a valid Long signal.
Dual CCI Short – triggered on a valid Short signal.
Happy trading!
Pine Script code included – copy, modify, and use at your own discretion.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.