MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

ATR Custom Indicator
Re: 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)

 

e-w-ATR_Custom_Indicato1.gif
 
[14113]

-----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) 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

 

e-w-ATR_Custom_Indicato2.gif
 
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

 
e-w-ATR_Custom_Indicato3.gif
 
Regards,
Bob

bjagow@xxxxxxx <mailto:bjagow@xxxxxxx>

[14127]
 
Source / From: TOP
http://purebytes.com/archives/metastock/

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!