cci

forge.tafunctionSince Forge API 1
Functionpython
forge.ta.cci(source: ArrayLike, period: int = 14) -> np.ndarray

Commodity channel index: distance from the average in units of mean deviation.

Parameters

NameTypeDefault
sourceArrayLike
periodint14

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) -> None

Distance from the average in units of mean deviation.

Inputs

NameTypeDefaultRange
sourcesourcehlc3
periodint141 to 5000

The typical price by default

CCI = (x - SMA) / (0.015 * mean absolute deviation) over the last period values

No deviation reads 0.