Commodity Channel Index (CCI)
CommodityChannelIndex(Periods, MA Type)
CCI(Periods, MA Type)
Donald Lambert developed the CCI indicator. Although the purpose of this
indicator is to identify cyclical turns in commodities, it is often used for securities.
This indicator oscillates between an overbought and oversold condition and
works best in a sideways market.
MA Type: SIMPLE
set CCI12 = CCI(12, SIMPLE)
set BUY = CCI12 > 0 AND REF(CCI12 , 1) < 0
Evaluates to buy when the CCI has just moved into positive territory.