- Katılım
- 23 Eki 2020
- Mesajlar
- 1,826
Improved & fully adjustable Dynamic Momentum Index. |
|
Dynamic Momentum Index - Jose { Jose's Dynamic Momentum Index v3.1, 0~100% } { (C) Copyright 2003-2004 Jose Silva } { http://www.metastocktools.com } pds:=Input("avg DyMoIdx periods",3,252,21); Stpds:= Input("Standard Deviation periods",2,252,5); x:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5 P=6",1,6,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, If(x=6,P,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:=Up*2/pds+PREV*(1-2/pds); DwAvg:=Dw*2/pds+PREV*(1-2/pds); DyMoIdx:= 100-(100/(1+UpAvg/If(DwAvg>0,DwAvg,.000001))); If(plot=1,DyMoIdx,pds) |
Source / From: |