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

Re: [EquisMetaStock Group] DMI Calculation



PureBytes Links

Trading Reference Links

thanks roy,

this is a great code. 



--- Roy Larsen <rlarsen@xxxxxxxxxxxxxx> wrote:
> Alex
> 
> This code shows the makeup of DI Plus an DI Minus
> but I'm not sure that you
> will be able to do what you want. What would you use
> in place of HIGH and
> LOW that made any sense?
> 
> Roy
> 
> {MetaStock code written by Equis and published in
> the Oct99 TASC}
>   {ADX Raw}
> Periods:= Input("Enter time periods",1,100,14);
> PlusDM:= If(HIGH>Ref(HIGH,-1) AND
> LOW>=Ref(LOW,-1), HIGH-Ref(HIGH,-1),
> If(HIGH>Ref(HIGH,-1) AND LOW<Ref(LOW,-1)
> AND HIGH-Ref(HIGH,-1)>Ref(LOW,-1)-LOW,
> HIGH-Ref(HIGH,-1), 0));
> DIPlus:= 100 * Wilders(PlusDM,Periods) /
> ATR(Periods);
> MinusDM:= If(LOW<Ref(LOW,-1) AND
> HIGH<=Ref(HIGH,-1), Ref(LOW,-1)-LOW,
> If(HIGH>Ref(HIGH,-1) AND LOW<Ref(LOW,-1)
> AND HIGH-Ref(HIGH,-1)<Ref(LOW,-1)-LOW,
> Ref(LOW,-1)-LOW, 0));
> DIMinus:= 100 * Wilders(MinusDM,Periods) /
> ATR(Periods);
> DIDif:= Abs(DIPlus - DIMinus);
> DISum:= DIPlus + DIMinus;
> ADXRaw:= 100 * Wilders(DIDif/DISum, Periods);
> ADXRaw;
> 
> 
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/ySSFAA/BefplB/TM
---------------------------------------------------------------------~->

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/