lower value than expected with iATR

 

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


 

When you print, use DoubleToStr()

     double ATR=iATR(_Symbol,0,14,0);
     Print(DoubleToStr(ATR,Digits));
Reason: