this
Description
The Commodity Channel Index (CCI) was developed by Donald Lambert to point out cyclical turning points in futures. It does appear to have valid application to other equities as well. The lookback peiod should be set to represent the average up/down cycle for best results. The proper cycle must be dermined by other means. Important trigger lines are plotted at +100 and -100. The thick, red line is the raw value of the CCI and the thin, maroon colored line is smoothed by an EMA.



The View title displays the most recent value of the CCI. The Titlebar Chart Code for this indicator is cci. (see EAS Titlebar Chart Codes)

Inputs
The lookback periods for this function are p0 and p1. p0 is a smoothing period and defines the thin maroon colored line. It is an EMA of the CCI. p1 is the period over which the CCI is calculated.

Output Data & Plotting
If returnflag is set to "data" a (b-a+1)-row by 1-column matrix of data will be returned. The output is only valid for data points beyond the lookback period, p1, in time. The output is the value of the CCI at any given point in time.

Background Reading
Further information regarding this indicator can be found in the following resources:
Equis.com Commodity Channel Index
Stockcharts.com CCI