- Katılım
- 23 Eki 2020
- Mesajlar
- 1,826
e: Built in ATR indicator vs. custom ATR · To: metastock@xxxxxxxxxxxxx · Subject: Re: Built in ATR indicator vs. custom ATR · From: BAUDECB@xxxxxxxxxxxxx (Christian Baude) · Date: Thu, 27 May 1999 01:16:34 GMT · Cc: Equis Support <support@xxxxxxxxx> · In-Reply-To: <24FA77225FA5D111869F0000C025B6F293504E@xxxxxxxxxxxxxxxxx> · References: <24FA77225FA5D111869F0000C025B6F293504E@xxxxxxxxxxxxxxxxx> · Reply-To: metastock@xxxxxxxxxxxxx · Sender: owner-metastock@xxxxxxxxxxxxx On Wed, 26 May 1999 09:15:48 -0600, Equis Support wrote: The actual ATR does not use a simple moving average. Welles Wilder uses >his own smoothing (a modified exponential average) which is the function "Wilders" in MetaStock. Try you formula this way: |
|
ATR Custom Indicator periods:=Input("ATR Periods?",1,100,10); TH:=If(Ref(C,-1) > H,Ref(C,-1),H); TL:=If(Ref(C,-1) < L,Ref(C,-1),L); TR:=TH-TL; Wilders(TR,periods) |
-----Original Message----- From: owner-metastock@xxxxxxxxxxxxx [mailto Sent: Thursday, May 27, 1999 6:59 AM To: metastock@xxxxxxxxxxxxx Subject: Re: Built in ATR indicator vs. custom ATR Bob Thank you for enlightening me on the Wilder's smoothing of the ATR. I too had pondered this question in that my ATR plost would agree perfectly for the period of 1 but as soon as I increased the period, I would get different results, and now way could I figure out what smoothing was being used. I have now modified my ATR indicator to comply with 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 whther these functions are more efficient than the IF function. Obviously both achieve the sme result. | ||||||||
| ||||||||
ATR (mine) I prd1:=input("enter ATR period",1,9999,7); prd2:=(prd1*2)-1; {max (absolute) of yesterday's close to today's high or today's low} myatr1:=Max(Abs(Ref(C,-1)-H),Abs(Ref(C,-1)-L)); {max of yesterday's close to today's high or today's low or today's range} myatr2:=Max(myatr1,H-L); myatr2 Regards ... Martin RE: Built in ATR indicator vs. custom ATR · To: <metastock@xxxxxxxxxxxxx> · Subject: RE: Built in ATR indicator vs. custom ATR · From: "Bob Jagow" <bjagow@xxxxxxx> · Date: Thu, 27 May 1999 09:56:35 -0700 · Importance: Normal · In-reply-to: <374D4F89.625342D@xxxxxxxxxxxxxx> · Reply-To: metastock@xxxxxxxxxxxxx · Sender: owner-metastock@xxxxxxxxxxxxx Martin, A friend showed that TrueRange required no comparisons; the algorithm in MS'ese is ATR (mine) II (H - L + Abs(H - Ref(C,-1)) + Abs(L - Ref(C,-1)) )/2
|