How to use iADX function to get the value of ADX on the last bar in a chart

 

Hi

I used iADX function  in following format

int  iRSI(
   string              symbol,            // symbol name
   ENUM_TIMEFRAMES     period,            // period
   int                 ma_period,         // averaging period
   ENUM_APPLIED_PRICE  applied_price      // type of price or handle
   );


in an indicator to get the value of ADX on the last bar of a chart, but it did not work, does it need extra code or I am doing something wrong.

Thanks

 
miillad:

Hi

I used iADX function  in following format

int  iRSI(
   string              symbol,            // symbol name
   ENUM_TIMEFRAMES     period,            // period
   int                 ma_period,         // averaging period
   ENUM_APPLIED_PRICE  applied_price      // type of price or handle
   );


in an indicator to get the value of ADX on the last bar of a chart, but it did not work, does it need extra code or I am doing something wrong.

Thanks

Did you read the documentation ?
 
Alain Verleyen:
Did you read the documentation ?


I wrote This code:

double adx=iADX(Symbol(),0,14);
   Comment(adx);

but error no indicator plot defined for indicator

 
miillad:


I wrote This code:

double adx=iADX(Symbol(),0,14);
   Comment(adx);

but error no indicator plot defined for indicator

"The function returns the handle of the Average Directional Movement Index indicator."

For values use CopyBuffer()

Reason: