Forums › ProRealTime English forum › ProScreener support › Daily ATR Range indicator Screener/Alert › Reply To: Daily ATR Range indicator Screener/Alert
10/02/2018 at 5:28 PM
#81797
There you go (screener not tested):
Daily ATR Range
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
ATRperiod = 20 //change this period as you wish dTR = 0 for i = 0 to ATRperiod dTR=dTR+max(abs(Dhigh(i)-Dlow(i)),max(abs(Dhigh(i)-Dclose(i+1)),abs(Dlow(i)-Dclose(i+1)))) next avg = dTR / ATRperiod htr = Dlow(0) + avg[1] ltr = Dhigh(0) - avg[1] x = 0 IF close > htr THEN x = 1 ELSIF close < ltr THEN x = -1 ENDIF SCREENER [x] (x AS "Signal") |