Function calculate_cci

Source
pub fn calculate_cci(df: &DataFrame, window: usize) -> PolarsResult<Series>
Expand description

Calculates Commodity Channel Index (CCI) Formula: CCI = (Typical Price - SMA(Typical Price)) / (0.015 * Mean Deviation)

§Arguments

  • df - DataFrame containing OHLC data with “high”, “low”, and “close” columns
  • window - Window size for CCI (typically 20)

§Returns

Returns a PolarsResult containing the CCI Series