iCCI
iCCI
Calculates the Commodity Channel Index indicator and returns its value.
double iCCI(
string symbol, // symbol
int timeframe, // timeframe
int period, // averaging period
int applied_price, // applied price
int shift // shift
);Parameters
- symbol
[in] Symbol name on the data of which the indicator will be calculated. NULL means the current symbol.
- timeframe
[in] Timeframe. It can be any of ENUM_TIMEFRAMES enumeration values. 0 means the current chart timeframe.
- period
[in] Averaging period for calculation.
- applied_price
[in] Applied price. It can be any of ENUM_APPLIED_PRICE enumeration values.
- 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(Symbol(),0,12,PRICE_TYPICAL,0)>iCCI(Symbol(),0,20,PRICE_TYPICAL,0)) return(0);Last updated on