QuantStudio Financial Data Analysis and Trading Framework

CCI Class

Commodity Channel Index (CCI)

For a list of all members of this type, see CCI Members.

System.Object
   RQuant.Indicator.TTimeArray
      RQuant.Indicator.TDoubleArray
         RQuant.Indicator.TIndicator
            RQuant.Indicator.CCI

[Visual Basic]
Public Class CCI
    Inherits TIndicator
[C#]
public class CCI : TIndicator

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The Commodity Channel Index, developed by Donald Lambert, is a complex indicator that follows trends. It is very similar to the Commodity Channel Index Standard, the difference being that mean deviation replaces standard deviation in the formula. Simply put, it measures the gap to a Moving Average.

The Commodity Channel Index is calculated as the difference between the mean price of a share and the average of the means over a chosen period. This difference is then compared with the average difference over the time period. For better comparison the result is not to be understood as a barrier, but rather as an orientation point which is often overridden by peaks.

This indicator is described in more details in the Steve Achelis' book "Technical Analysis from A to Z".

Formula:

Example

TDataManager.cd("Demo");

TDailyArray Daily1 = TDataManager.GetStock("YHOO").DailyArray;

DateTime Date1 = DateTime.Parse("1999/02/08"); 
DateTime Date2 = DateTime.Parse("2000/12/29"); 

TDailyArray Daily = Daily1.Clone(Date1, Date2);

TCanvas Canvas = new TCanvas("Canvas","CCI DEMO",600,400);
    
Canvas.Divide(1,2);

CCI CCI = new CCI(Daily, 14);

Canvas.cd(1);
Daily.Draw("c");

Canvas.cd(2);
CCI.Draw(Color.Red);

Requirements

Namespace: RQuant.Indicator

Assembly: RQuant.Indicator (in RQuant.Indicator.dll)

See Also

CCI Members | RQuant.Indicator Namespace