[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Built in ATR indicator vs. custom ATR



PureBytes Links

Trading Reference Links

Bob ...

That is amazing ...

I would never have thought of this and obviously it works. I have used example
bars where the current bar has gapped up, gapped down and straddled yesterday's
close and it works. I also confirmed it plots the identical result. Just
amazing.

Thank you very much for your insight.

Regards ... Martin


Bob Jagow wrote:

> Martin,
> A friend showed that TrueRange required no comparisons; the algorithm in
> MS'ese is
>
> TR = (H - L +  Abs(H - Ref(C,-1)) + Abs(L - Ref(C,-1)) )/2
>
> Regards,
> Bob
>
> bjagow@xxxxxxx <mailto:bjagow@xxxxxxx>
>
> -----Original Message-----
> From: owner-metastock@xxxxxxxxxxxxx
> [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Martin Haesler
> 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)
> 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);
> Regards ... Martin
>
> Bob Jagow wrote:
>
> > Sounds like you have a mailreader problem, Chris.
> > the < and > were  there.
> >   As I  posted privately to Yngvi,
> > Wilders(TR,periods)is just
> > Mov(TR,2*periods-1,E)
> >
> > Bob
> >
> > bjagow@xxxxxxx <mailto:bjagow@xxxxxxx>
> >
> > -----Original Message-----
> > From: owner-metastock@xxxxxxxxxxxxx
> > [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Christian Baude
> > Sent: Wednesday, May 26, 1999 6:17 PM
> > To: metastock@xxxxxxxxxxxxx
> > Cc: Equis Support
> > Subject: Re: Built in ATR indicator vs. custom ATR
> >
> > 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:
> > >
> > >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)
> >
> > Yngvi Hardarson [mailto:hardy@xxxxxxxxxxxxx] wrote:
> >
> > >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;
> > >Mov(TR,periods,S)
> >
> > Did Equis' OLR digest the [Greater than] and [Less than] symbols?
> >
> > -= Chris ß =-
> > Using MetaStock/FastTrack/FastRUBE/FastTools/EZPnF/TC2000