in Search

Dynamic Momentum Index (DMI)

Last post 10-03-2006, 9:00 by jjstein. 6 replies.
Sort Posts: Previous Next
  •  08-09-2005, 23:01 5890

    Dynamic Momentum Index (DMI)

    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}

    equismetastock@yahoogroups.com
  •  08-10-2005, 8:13 5909 in reply to 5890

    Re: Dynamic Momentum Index (DMI)

    Also check out this dll version below - it may need debuging as I don't have MetaStock with me at the moment.

    Code:

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


    jose '-)
    http://www.metastocktools.com
    .
    MetaStockTools.com
  •  08-19-2005, 5:18 6408 in reply to 5890

    Re: Dynamic Momentum Index (DMI)

    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}

    equismetastock@yahoogroups.com
  •  09-29-2006, 9:08 21205 in reply to 6408

    Re: Dynamic Momentum Index (DMI)

    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

  •  09-29-2006, 23:04 21228 in reply to 21205

    Re: Dynamic Momentum Index (DMI)

    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 Big Smile [:D]


    "The question of whether a computer can think is no more interesting than the question of whether a submarine can swim."
    Edsgar W. Dijkstra

     

    MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
    For custom MetaStock programming : http://www.wabbit.com.au
    My SkyPE status :
    My SkyPE account : wabbit.com.au

  •  10-01-2006, 23:51 21254 in reply to 21228

    Re: Dynamic Momentum Index (DMI)

    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 ?

     

  •  10-03-2006, 9:00 21281 in reply to 21205

    Re: Dynamic Momentum Index (DMI)

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

     


    --Johnathan
View as RSS news feed in XML