Commodity Channel Index (CCI) indicator is an oscillator that measures an asset's current price level relative to an average price level over a specified period of time. It is used to determine a new trend or to warn about extreme conditions.
In FinancialChart, you need to use a CCI object to work with Commodity Channel Index. FinancialChart also enables you to fetch the calculated CCI values at run-time using GetValues() method. This can help in creating alerts in application or maintaining logs while working with dynamic data.
The following code snippet demonstrates how you can use CCI indicator. The below example uses data from a class DataService. To see the detailed code for DataService class, refer Average True Range indicator.