Rank:: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 4/1/2006(UTC) Posts: 135 Location: Romania
|
StR1,
Look again, MDI is there as well as PDI and ADX. But if u really want a formula here it is:
perd:=Input("Periods -DI",2,200,20);
DMDn:= If(L<Ref(L,-1) AND H<Ref(H,-1),Ref(L,-1)-L,If(L<Ref(L,-1) AND H>Ref(H,-1),If(Ref(L,-1)-L>H-Ref(H,-1),Ref(L,-1)-L,0),0));
TR1:= Max(H-L,H-Ref(C,-1)); {day true range} TR:=If(TR1>Ref(C,-1)-L,TR1,Ref(C,-1)-L);
AvgDMDn:=Mov(DMDn,perd,E); AvgTR:=Mov(TR,perd,E);
DIminus:=AvgDMDn/AvgTR*100;
DIminus
Cheers
|