iADX
iADX
Calculates the Average Directional Movement Index indicator and returns its value.
double iADX(
string symbol, // symbol
int timeframe, // timeframe
int period, // averaging period
int applied_price, // applied price
int mode, // line index
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.
- mode
[in] Indicator line index. It can be any of the Indicators line identifiers enumeration value. (0 - MODE_MAIN, 1 - MODE_PLUSDI, 2 - MODE_MINUSDI).
- 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 Directional Movement Index indicator.
Example:
if(iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0)>iADX(NULL,0,14,PRICE_HIGH,MODE_PLUSDI,0)) return(0);Last updated on