- Katılım
- 23 Eki 2020
- Mesajlar
- 1,823
I have now modified my ATR indicator to complywith the Wilder's smoothing and get the identical plot. My formula using the ABS and MAX functions is attached for interest. I don't know whether these functions are more efficient than the IF function. Obviously both achieve the same result. |
|
Haeslers ATR prd1:=input("enter ATR period",1,9999,7); prd2:=(prd1*2)-1; {max (absolute) of yesterday's close to today'shigh or today's low} myatr1:=Max(Abs(Ref(C,-1)-H),Abs(Ref(C,-1)-L)); {max of yesterday's close to today's highor today's low or today's range} myatr2:=Max(myatr1,H-L); myatr2 |
from Martin Haesler | |
| |
Source / From: |