The Commodity Channel Index (CCI) attempts to identify starting and ending trends.
Object that is coercible to xts or matrix and contains High-Low-Close prices. If only a univariate series is given, it will be used. See details.
Number of periods for moving average.
A function or a string naming the function to be called.
Constant to apply to the mean deviation.
Other arguments to be passed to the
CCI relates the current price and the average of price over
The CCI usually falls in a channel of -100 to 100. A basic CCI trading system
is: Buy (sell) if CCI rises above 100 (falls below -100) and sell (buy) when
it falls below 100 (rises above -100).
CCI is usually calculated using the typical price, but if a univariate series (e.g. Close, Weighted Close, Median Price, etc.) is provided, it will be used instead.
A object of the same class as
HLC or a vector (if
try.xts fails) containing the CCI values.
HLC is a High-Low-Close matrix, then typical price will be
HLC is a vector, then those values will be used
instead of the typical price.
The following site(s) were used to code/document this
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.