icci()
Previous  Next

icci

Calculates the Commodity Channel Index indicator and returns its value.

double  icci(
   int          timeframe,        // timeframe
   int          period,           // averaging period
   int          applied_price,    // applied price
   int          shift             // shift
   );

Parameters

timeframe

[in]  Timeframe in minutes. It can be one of the period constants.

period

[in]  Averaging period for calculation.

applied_price

[in]  Applied price. It can be any of the applied price constants.

shift

[in]  Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Returned value

Numerical value of the Commodity Channel Index indicator.

Example:

if (icci(1440,12,PRICE_TYPICAL,0)>iCCI(1440,20,PRICE_TYPICAL,0)) return(0);