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