Purpose the Commodity Channel Index (CCI)
The Commodity Channel Index (CCI) is a momentum-based indicator used to identify overbought, oversold, and trend reversal points. It measures how far the current price is from its statistical average, helping traders spot potential entry and exit zones.
How It Works
When you select CCI in the Trade Rule block, you can configure it to match your trading style:
CCI Period
The number of candles used to calculate the CCI.
Example: A period of
14uses the last 14 candles.Shorter periods = more sensitive, longer periods = smoother signals.
Applied Price of CCI (Price source for calculation)
Close Price: Candle closing price.
Open Price: Candle opening price.
High Price: Highest price in the candle.
Low Price: Lowest price in the candle.
Median Price: (High + Low) ÷ 2
Typical Price: (High + Low + Close) ÷ 3
Weighted Price: (High + Low + Open + Close) ÷ 4
Time Frame of CCI
Sets the chart time frame used for the CCI calculation.
Can be replaced with a variable or input for flexibility and faster backtesting.
Candle ID
0: Current forming candle.
1: Most recently closed candle.
Higher IDs = older candles.
Adjust of CCI (Modify the Output)
Apply mathematical changes to the calculated value: add, subtract, multiply, or divide by a chosen number.
Example
If you set:
CCI Period: 20
Applied Price: Typical Price
Time Frame: Current chart
Candle ID: 1
The block returns the 20-period CCI value for the most recently closed candle, calculated from the typical price.
Use Cases
Identify overbought levels (commonly above +100).
Identify oversold levels (commonly below -100).
Spot potential trend reversals when CCI moves back toward zero.
Combine with other indicators to confirm signals.
⚠ Tip: The CCI is very responsive to market volatility — use filters or additional rules to avoid whipsaws in choppy markets.

