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

[EquisMetaStock Group] Re: indicator assistance...Wilders ATR



PureBytes Links

Trading Reference Links

--- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxx> wrote:
>
> Steve,
> 
> I believe this is what you want.
> 
> {Average True Range - Welles Wilder}
> {Written by Ton Maas-981225-Amsterdam-the Netherlands}
> {Found at EquisMetastock YahooGroups}
> {Formula:}
> PDS:=Input("Lookback Periods",1,999,10);
> TR1:=Abs(H-L);
> TR2:=Abs(Ref(C,-1)-H);
> TR3:=Abs(Ref(C,-1)-L);
> MX1:=Max(TR1,TR2);
> MX2:=Max(TR1,TR3);
> MX3:=Max(TR2,TR3);
> MXTRS:=If(MX1>MX2,
> If(MX1>MX3,MX1,
> If(MX2>MX3,MX2,MX3)),MX2);
> WATR:=Wilders(MXTRS,pds);
> WATR;
> 
> 
> Wilders smoothing is actually nothing more than a shortened lookback 
> period version of an exponential moving average. Like this:
> Mov(Data,pds*2-1,E)
> 
> 
> Hope this helps,
> 
> Preston


The code can be simplified:

PDS:=Input("Lookback Periods",1,999,10);
TR1:=Abs(H-L);
TR2:=Abs(Ref(C,-1)-H);
TR3:=Abs(Ref(C,-1)-L);
tr:=Max(Max(TR1,TR2),TR3);
WATR:=Wilders(tr,pds);
WATR;





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/