问个问题

 

我想得到当前的ATR值。为什么shift参数用0没有值?但用1就有值,但是是上一个值。

ATRCurrent=iATR(NULL,15,1,1);

 
ATR is Average True Range. If period of iATR equals 1 that means True Range on one-bar range. If we want to see ATR on one-bar range on 0 (zero) index bar which is uncompleted bar it means we measure difference between High and Low. In first tick this difference equals 0. See https://www.metatrader5.com/zh/terminal/help/indicators/oscillators/atr
 

能看懂中文,为什么不用中文回复一下呢?

 
thanks
 
john2007smith:

能看懂中文,为什么不用中文回复一下呢?

I don't speak Chinese. I translate Chinese posts with Babelfish
 

Dear: Rosh

Respect to you, you do all the hard work to help the new people like me, Thank you.

 
Rosh:
ATR is Average True Range. If period of iATR equals 1 that means True Range on one-bar range. If we want to see ATR on one-bar range on 0 (zero) index bar which is uncompleted bar it means we measure difference between High and Low. In first tick this difference equals 0. See https://www.metatrader5.com/zh/terminal/help/indicators/oscillators/atr


Rosh的意思是 ATR是平均真实波动.如果 iATR 的周期等于1的话,就意味真实波动在1柱(这个1柱不是first bar那柱)的波动.如果你想要让ATR在first bar( 比如buffer[0]这个),这就意味着我们在测量不同的最高和最低, 第一个参数NULL是空不是零.

我英语水平有限,他的大概意思就是这样了