iatr()
Previous
Next
iatr
Calculates the Average True Range indicator and returns its value.
double iatr(
int timeframe, // timeframe
int period, // averaging period
int shift // shift
);
Parameters
timeframe
[in] Timeframe in minutes. It can be one of the
period constants
.
period
[in] Averaging period for calculation.
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 Average True Range indicator.
Example:
if (iatr(1440,12,0)>iatr(1440,20,0)) return(0);