dotnetCHARTING Send comments on this topic.
CommodityChannelIdxOverPeriod(Series,Int32) Method
See Also 
dotnetCHARTING Namespace > FinancialEngine Class > CommodityChannelIdxOverPeriod Method : CommodityChannelIdxOverPeriod(Series,Int32) Method


s
A series where the first element is the high in the last trading period, the second term is the high in the previous period and so on.
lengthOfPeriod
An integer which represents the length of the period over which the indicator will be iteratively evaluated.
This indicator is a generalization of the CommodityChannelIndex indicator and calculates the values of the commodityChannelIndex indicator over all sub-periods of a given length.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function CommodityChannelIdxOverPeriod( _
   ByVal s As Series, _
   ByVal lengthOfPeriod As Integer _
) As Series
Visual Basic (Usage)Copy Code
Dim s As Series
Dim lengthOfPeriod As Integer
Dim value As Series
 
value = FinancialEngine.CommodityChannelIdxOverPeriod(s, lengthOfPeriod)
C# 
public static Series CommodityChannelIdxOverPeriod( 
   Series s,
   int lengthOfPeriod
)

Parameters

s
A series where the first element is the high in the last trading period, the second term is the high in the previous period and so on.
lengthOfPeriod
An integer which represents the length of the period over which the indicator will be iteratively evaluated.

Exceptions

ExceptionDescription
ArgumentExceptionThrown if any elements from the highs, lows or closes are strictly negative, or if the length of the arrays is not equal or the lengthOfPeriod is grater than the length of the array high.

Remarks

The CCI measures the variation of a security's price from its statistical mean. High values show that prices are unusually high compared to average prices whereas low values indicate that prices are unusually low. The CCI can be used effectively on any type of security, but clearly it is most applicable where the security has should a strong degree on mean reversion.

Lambert originally commended that the CCI was designed to capture the trade cycle (i.e. low-to-low or high-to-high) turns in commodity markets. The system assumes that commodities move in cycles and uses 1/3 of the cycle period for the evaluation of the CCI. We allow the uses to specify the length of the calculation period used but we advise that you take the calculation cycle to be approximately one third of your estimate for the length of the trade cycle.

Calculation Period: the number of days used in the evaluation of the CCI. In Donald Lambert's original system this was taken to be one third of the estimate length of the trade cycle.

Remark: Within the evaluation procedure (step 2), we multiply the result by the constant 0.015. The constant was originally used in Lambert's system and has been found to ensure that around 70-80 percent of all the values given by the CCI lie the range [-100,+100]. Hence, the constant is just used to calibrate the indicator with respect to the range [-100, +100].

Interpretation
Significant signals are generated when either the CCI starts to diverge from the price action which will signify a correlation in the price, or when the CCI extended (typically above 100 or below -100) which indicates oversold or over brought conditions.

Further details concerning the CCI can be found in an article by Donald Lambert that appeared in the October 1980 issue of Commodities (now known as Futures) Magazine.

Evaluation Procedure
We summaries our basic evaluation procedure by the following three steps:

  • First evaluate the simple moving average (SMA) of the Typical Price Indicator (see Filters) over the calculation period.
  • Evaluate the SMA over the calculation period of the absolute value on each on the calculation period days between the Typical Price on that day and the SMA found in step 1 above, and multiply the result by 0.015.
  • Divide todays typical price minus the SMA of the typical price found in step 1, by the result given by step 2.
  • See Also

    © 2010 All Rights Reserved.