Momentum indicators
Commodity Channel Index
Unbounded oscillator measuring typical-price deviation from its recent mean.
- Engine
- TA-Lib
- Function
CCI- Input series
- high, low, close
- Outputs
- 1
How it works
CCI calculates typical price from high, low, and close, compares it with the simple average of typical price, and scales the difference by mean absolute deviation and the constant 0.015.
Use case
Use CCI as a momentum and price-deviation feature for identifying unusually strong moves, trend changes, and relative extremes.
Parameters
| Parameter | Type | Default | Bounds or options | Description |
|---|---|---|---|---|
| Time Period | integer | 14 | 2…100000 | Number of bars used for the typical-price average and mean-deviation calculation. |
Outputs
| Output | Type | Description |
|---|---|---|
| CCI | number | Commodity Channel Index value for the bar. |
Reading the result
CCI expresses how far the current typical-price behavior is from its recent average relative to recent mean deviation. Despite its name, it is not limited to commodity markets.
The result is not tightly bounded. Large positive or negative readings describe unusual displacement for the configured local history, but the frequency of those readings depends on the market and timeframe.
Common mistakes
- Assuming a fixed threshold has the same rarity in every dataset.
- Treating an extreme as an automatic reversal.
- Comparing CCI with close-only indicators without remembering that its input uses the bar range.
- Ignoring provider differences in high and low values.
DataCat workflow notes
For regime-aware analysis, inspect both the level and how long it remains on one side of zero. Estimate threshold frequencies from the actual training dataset instead of relying only on textbook labels.