cci
forge.tafunctionSince Forge API 1
Functionpython
forge.ta.cci(source: ArrayLike, period: int = 14) -> np.ndarrayCommodity channel index: distance from the average in units of mean deviation.
Parameters
| Name | Type | Default |
|---|---|---|
| source | ArrayLike | |
| period | int | 14 |
Indicator: Commodity channel index
(x - mean) / (0.015 * mean absolute deviation) over the last period values. A window
with no deviation reads 0.
Classpython
forge.ta.CCI(**inputs: Any) -> NoneDistance from the average in units of mean deviation.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| source | source | hlc3 | |
| period | int | 14 | 1 to 5000 |
The typical price by default
CCI = (x - SMA) / (0.015 * mean absolute deviation) over the last period values
No deviation reads 0.