PureBytes Links
Trading Reference Links
|
Hi Shelly
Yes, the MS ADX() function does round to whole numbers. It also rounds PDI() and MDI()
Equis created a formula for ADX that does not round any of these values, and you might find it more useful. I think the formula is still available on the Equis website but the version I have is given below. I've renamed it "ADX Raw".
PDI and MDI can be extracted using the variables "DIPlus" and "DIMinus".
FmlVar("ADX Raw","DIPlus");
FmlVar("ADX Raw","DIMinus");
Notice that adding Round() to DIPlus and DIMinus creates exactly the same values as PDI() and MDI().
Round(FmlVar("ADX Raw","DIPlus"));
Round(FmlVar("ADX Raw","DIMinus"));
{MetaStock code written by Equis and published in the Oct99 TASC}
{ADX Raw}
Periods:=Input("Enter time periods",1,100,14);
PlusDM:=If(H>Ref(H,-1) AND
L>=Ref(L,-1),H-Ref(H,-1),
If(H>Ref(H,-1) AND L<Ref(L,-1)
AND H-Ref(H,-1)>Ref(L,-1)-L,
H-Ref(H,-1),0));
DIPlus:=100*Wilders(PlusDM,Periods)/ATR(Periods);
MinusDM:=If(L<Ref(L,-1) AND
H<=Ref(H,-1),Ref(L,-1)-L,
If(H>Ref(H,-1) AND L<Ref(L,-1)
AND H-Ref(H,-1)<Ref(L,-1)-L,
Ref(L,-1)-L,0));
DIMinus:=100*Wilders(MinusDM,Periods)/
ATR(Periods);
DIDif:=(Abs(DIPlus - DIMinus));
DISum:=(DIPlus + DIMinus);
100*Wilders(DIDif/DISum,Periods);
Hope this helps.
Regards
Roy
----- Original Message -----
From: Shelley Gould
To: equismetastock@xxxxxxxxxxxxxxx
Sent: Monday, June 11, 2007 9:05 AM
Subject: [EquisMetaStock Group] re: rounding ADX
All - does Metastock round the ADX to the nearest whole number. I have read where this can cause problems when measuring the rate of change.
??
thxs.
shelley
Shelley Gould
sfgmail@xxxxxxxxx
[Non-text portions of this message have been removed]
__________ NOD32 2321 (20070610) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
[Non-text portions of this message have been removed]
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/
|