lower value than expected with iATR

To add comments, please log in or register
Luciole
154
Luciole  

Morning' everyone,

I would like to get the value of the Average True Range Indicator (ATR).

I tried to use the following code, but the value is way lover than the one given by the indicator.

iATR(NULL,0,14,0);


When I print, the value displayed is:  3.000000000000621 e-05.


Any idea why?


Thanks in advance for your help,

Respectfully,

Luciole


Keith Watford
Moderator
18437
Keith Watford  

When you print, use DoubleToStr()

     double ATR=iATR(_Symbol,0,14,0);
     Print(DoubleToStr(ATR,Digits));
To add comments, please log in or register