CCI(HLC, n=20, maType, c=0.015, ...)maType function.HLC or a vector (if try.xts
fails) containing the CCI values.n periods. 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.
EMA, SMA, etc. for moving average options;
and note Warning section. See aroon, ADX,
TDI, VHF, GMMA for other
indicators that measure trend direction/strength.data(ttrc)
cci <- CCI(ttrc[,c("High","Low","Close")])Run the code above in your browser using DataLab