irsi()
Previous  Next

irsi

Calculates the Relative Strength Index indicator and returns its value.

double  irsi(
   int          timeframe,        // timeframe
   int          period,           // 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 Relative Strength Index indicator.

Example:

if (irsi(1440,14,PRICE_CLOSE,0)>iRSI(1440,14,PRICE_CLOSE,1)) return(0);