Up

Version 1.3 New Features

Protect Formulas Keltner Bands Commodity Channel Index Money Flow Index Previous Versions

COMMODITY CHANNEL INDEX CCI

The CCI or commodity channel index was developed by Donald Lambert, and measures the changes between a security's price and its statistical mean. When the CCI is high it shows that prices are high compared to average prices. If the CCI is low it indicates prices are low compared to the historical average prices.

The formula that ErlangerQuote uses, in Equis MetaStock language format, is as follows.

Inputs: Length(NumericSimple);
Variables: Sum(0), Counter(0), MD(0), Avg(0);

If Length > 0 Then Begin
          Avg = Average(High  + Low + Close, Length);
          MD = 0;
          For counter = 0 To Length - 1 Begin
                  MD = MD + AbsValue(High[counter] + Low[counter] + Close[counter] - Avg);
          End;
          MD = MD / Length;
          If MD = 0 Then
                  CCI = 0
          Else
                  CCI = (High + Low + Close - Avg) / (0.015 * MD);
End
Else
          CCI = 0;

You can find more details about the CCI at http://www.equis.com/free/taaz/cci.html.