logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
pumrysh  
#1 Posted : Tuesday, August 9, 2005 11:01:00 PM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

Dynamic Momentum Index (DMI) Description: The Dynamic Momentum Index (DMI) was developed by Tushar Chande and Stanley Kroll. The indicator is covered in detail in their book The New Technical Trader. The DMI is identical to Welles Wilder's Relative Strength Index except the number of periods is variable rather than fixed. The variability of the time periods used in the DMI is controlled by the recent volatility of prices. The more volatile the prices, the more sensitive the DMI is to price changes. In other words, the DMI will use more time periods during quiet markets, and less during active markets. The time periods the DMI can reach is around a maximum of 30 and a minimum of 3. The volatility index used in controlling the time periods in the DMI is based on a calculation using a five period standard deviation and a ten period average of the standard deviation. The advantage of using a variable length time period when calculating the RSI is that it overcomes the negative effects of smoothing, which often obscure short-term moves. In this indicator the option to use a bipolar index is also introduced. The formula for a bipolar index is Bipolar =( up - down ) / ( up + down ) Interpretation: Chande recommends using the DMI much the same as the RSI. However, because the DMI is more sensitive to market dynamics, it often leads the RSI into overbought / oversold territories by one or two days. Like the RSI, look for overbought (bearish) conditions above 70 and oversold (bullish) conditions below 30. However, before basing any trade off of strict overbought/oversold levels using DMI or any overbought/oversold indicator, Chande recommends that you first qualify the trendiness of the market using indicators such as r-squared or CMO. If these indicators suggest a non-trending market, then trades based on strict overbought/oversold levels should produce the best results. If a trending market is suggested, you can use the DMI to enter trades in the direction of the trend. Formula: {Dynamic Momentum Index (DMI)} {written by Preston Umrysh} {This indicator uses Dll software developed by MetaStock Forum Crew} {http://forum.equis.com)} x:=Input("normal ouput=1 Biplolar index=2",1,2,1); Vt:=(Stdev(C,5)/Mov(Stdev(C,5),10,S))*10; Umom:=If(C>Ref(C,-1),C-Ref(C,-1),0); Dmom:=If(C<Ref(C,-1),Ref(C,-1)-C,0); UPS:= ExtFml( "ForumDll.VarSUM", Umom,Vt); DNS:= ExtFml( "ForumDll.VarSUM", Dmom,Vt); SumU:=ExtFml("ForumDll.VarMOV",UPS,Vt,e)/Vt; SumD:=ExtFml("ForumDll.VarMOV",DNS,Vt,e)/Vt; RS:=SumU/SumD; DMnm:=100-(100/(1+RS)); DMIn:=(SumU-SumD)/(SumU+SumD); If(x=1,DMnm,DMin); {end}
Jose  
#2 Posted : Wednesday, August 10, 2005 8:13:37 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Also check out this dll version below - it may need debuging as I don't have MetaStock with me at the moment. [code:1:0e55c2495a] ======================== Dynamic Mom Index - jose ======================== ---8<--------------------------- { Jose's Dynamic Momentum Index v4.0, 0~100% } { Copyright 2005 Jose Silva } { For personal use only } { http://www.metastocktools.com } { Indicator uses Dll developed by MetaStock Forum Crew } { Available at http://forum.equis.com } pds:=Input("avg DyMoIdx periods",3,260,21); Stpds:=Input("Standard Deviation periods",2,260,5); x:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5",1,5,4); plot:=Input("[1]Dynamic Momentum Idx, [2]dynamic periods used",1,2,1); x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,C)))); Vt:=Stdev(x,Stpds)/Mov(Stdev(x,Stpds),10,S); pds:=pds/(Vt+.14142); pds:=If(pds>Cum(IsDefined(x))-13, Cum(IsDefined(x))-13,pds); pds:=If(pds<2,2,pds); Up:=If(x>Ref(x,-1),x-Ref(x,-1),0); Dw:=If(x<Ref(x,-1),Ref(x,-1)-x,0); UpAvg:=ExtFml("ForumDll.VarMOV",Up,pds,e); DwAvg:=ExtFml("ForumDll.VarMOV",Dw,pds,e); DyMoIdx:=100-(100/(1+UpAvg/Max(DwAvg,.000001))); If(plot=1,DyMoIdx,pds) ---8<--------------------------- [/code:1:0e55c2495a] jose '-) http://www.metastocktools.com .
pumrysh  
#3 Posted : Friday, August 19, 2005 5:18:26 AM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

Version 2...corrects for a volatility division error {Dynamic Momentum Index (DMI)} {written by Preston Umrysh} {[version2.0] corrects volatility division error} {This indicator uses Dll software developed by MetaStock Forum Crew} {http://forum.equis.com)} x:=Input("normal ouput=1 Biplolar index=2",1,2,1); Vt:=(Stdev(C,5)/Mov(Stdev(C,5),10,S))*10; Vt:=Max(vt,.0000001); Umom:=If(C>Ref(C,-1),C-Ref(C,-1),0); Dmom:=If(C<Ref(C,-1),Ref(C,-1)-C,0); UPS:= ExtFml( "ForumDll.VarSUM", Umom,Vt); DNS:= ExtFml( "ForumDll.VarSUM", Dmom,Vt); SumU:=ExtFml("ForumDll.VarMOV",UPS,Vt,e)/Vt; SumD:=ExtFml("ForumDll.VarMOV",DNS,Vt,e)/Vt; RS:=SumU/SumD; DMnm:=100-(100/(1+RS)); DMIn:=(SumU-SumD)/(SumU+SumD); If(x=1,DMnm,DMin); {end}
fouchtra  
#4 Posted : Friday, September 29, 2006 9:08:44 AM(UTC)
fouchtra

Rank: Newbie

Groups ready for retrieval: Registered, Registered Users
Joined: 11/30/2005(UTC)
Posts: 1

When I use your formula in the Indicator Builder, I receive the following message: This DLL does not exist in the MSX DLL Folder.

UPS:= ExtFml( "ForumDll.VarSUM", Umom,Vt);

Could you tell me how to settle this problem?

Thank you Pumrysh.

fouchtra

wabbit  
#5 Posted : Friday, September 29, 2006 11:04:05 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)

You need to download the free Forum.dll file from the downloads section. Check after installing the file the name of the dll itself. It might install as Forum20.dll or something similar.

wabbit [:D]

swordman  
#6 Posted : Sunday, October 1, 2006 11:51:44 PM(UTC)
swordman

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/10/2006(UTC)
Posts: 42
Location: Hong Kong

dear all :

May I ask what is the different between this and the build in DMI . I am using version 9.1 and there is a DMI in the list . Is this a new one mentioned here ?

jjstein  
#7 Posted : Tuesday, October 3, 2006 9:00:12 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)

1. First, make sure you have downloaded & installed the FORUM.DLL file from the download section of this forum.

2. Second, these code snippets seem to be at odds with the current syntax of FORUM.DL; I don't know why. You need to do a little editting -- delete all "Dll" and "Var", like this:

UPS:= ExtFml( "ForumDll.VarSUM", Umom,Vt);

...should be...

UPS:= ExtFml( "Forum.SUM", Umom,Vt);

koronos  
#8 Posted : Friday, February 6, 2015 10:58:56 AM(UTC)
koronos

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 1/8/2013(UTC)
Posts: 7

Hello

where can I download the forum dll to use Jose's or Pumrysh's Dynamic Momentum Index. Searched the forum, however, couldn't find a source.

Thanks.

Kind regards

koronos

MS Support  
#9 Posted : Friday, February 6, 2015 2:19:51 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
There is a Files section and a Programming subsection at the top of the forum page, although I am not sure if there might be permission issues accessing this. You can try: http://forum.metastock.c...Net/resource.ashx?a=2650
koronos  
#10 Posted : Friday, February 6, 2015 7:46:54 PM(UTC)
koronos

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 1/8/2013(UTC)
Posts: 7

Thanks.

 I’ve downloaded the forum20.dll. Where shall I save it to? To the External Function DLLs folder? And do I have to take any further action to make it work?

Thanks again.

Kind regards

koronos

MS Support  
#11 Posted : Friday, February 6, 2015 9:13:11 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
Originally Posted by: koronos Go to Quoted Post

Thanks.

 I’ve downloaded the forum20.dll. Where shall I save it to? To the External Function DLLs folder? And do I have to take any further action to make it work?

Thanks again.

Kind regards

koronos


 

Correct, it would go into the appropriate External Function DLLs folder (location dependent on which version of MetaStock).  Restarting MetaStock is required for DLLs to be accessible within the application.

mstt  
#12 Posted : Friday, February 13, 2015 4:23:04 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi koronos Be aware that Forum20.DLL might not be the same as ForumDLL as shown in Jose's and Preston's formulas, which appears to be the original DLL rather than the updated one. You can tell the difference by size - the older one is 164KB and the newer one is 188KB. The newer DLL also has many more functions, and I believe it to be more reliable. Although some functions in one DLL will perform the same as the equivalent in the other, you need to know that newer DLL function names do not have "Var" in them. I have these DLLs named as Forum.dll and ForumOld.dll in all versions of MetaStock that I use. Long-winded DLL names are OK, but the downside with longer formulas is that you might hit the 2499 character limit before you get to complete the formula. This isn't going to happen with the formulas in question, but most competent coders will hit the limit at some time and then have to start reducing the number of characters for variable names. Or adopt another space reduction method. Roy
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.