API documentation for pandas_ta.momentum.cci Python function.

cci(high, low, close, length=None, c=None, talib=None, offset=None, **kwargs)[source]#

Commodity Channel Index (CCI)

Commodity Channel Index is a momentum oscillator used to primarily identify overbought and oversold levels relative to a mean.


Default Inputs:

length=14, c=0.015

SMA = Simple Moving Average MAD = Mean Absolute Deviation tp = typical_price = hlc3 = (high + low + close) / 3 mean_tp = SMA(tp, length) mad_tp = MAD(tp, length) CCI = (tp - mean_tp) / (c * mad_tp)


high (pd.Series): Series of ‘high’s low (pd.Series): Series of ‘low’s close (pd.Series): Series of ‘close’s length (int): It’s period. Default: 14 c (float): Scaling Constant. Default: 0.015 talib (bool): If TA Lib is installed and talib is True, Returns the TA Lib

version. Default: True

offset (int): How many periods to offset the result. Default: 0


fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method


pd.Series: New feature generated.