Well, I found something more relevant for the formula :
1
2
3
4
5
CurrentATR=[(PriorATRx13)+CurrentTR]/14
-Multiplytheprevious14-dayATRby13.
-Addthemostrecentday'sTRvalue.
-Dividethetotalby14
So here is the ATR formula to compute the Daily timeframe to be used in any other timeframe.
1
2
3
4
5
6
7
8
9
10
11
12
period=14
//True range calculation
d1=Dhigh(0)-Dlow(0)
d2=abs(Dhigh(0)-Dclose(1))
d3=abs(Dlow(0)-Dclose(1))
dailyTR=max(d1,max(d2,d3))
c=exponentialaverage[period](dailyTR)
RETURNcas"Daily Timeframe ATR"
Which return the good result in daily timeframe, same as the embedded ATR of the platform (look at picture attached). But a slightly different one when in inferior timeframe. Don’t know really why for the moment..
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok