Commodity Channel Index Formula
The commodity channel index formula calculates the mean deviation of the daily average price from the moving average. A value above 100 indicates that the commodity is overbought, and a value below -100 indicates that the commodity is oversold.
Chart.DataManipulator.FinancialFormula( FinancialFormula.CommodityChannelIndex, "Period", "High,Low,Close", "CCI")
This formula takes one optional parameter.
- Period for calculating the commodity channel index. The default value is 10.
This formula takes three input Y values.
- Daily high price.
- Daily low price.
- Daily close price.
This formula outputs one Y value.
- Commodity channel index.
The following example takes input from Series1's Y values for high, low, and close prices, respectively (Series1:Y,Series1:Y2,Series1:Y3), and outputs the relative strength indicator on Series3 (Series3:Y). It also specifies a period of 15 days.