powered by
Calculates CCI using closing prices. CCI measures deviation from average price. Values above 100 indicate overbought, below -100 indicate oversold.
calc_cci(data, period = 20)
Data.table with CCI values
Data frame with Date column and price columns
CCI period (default: 20)
data("sample_prices_weekly") cci <- calc_cci(sample_prices_weekly, period = 20)
Run the code above in your browser using DataLab