Metastock Indicator Formula |
Tom Demark's Range Expansion Index |
Formula: |
TDREI
TD1:= H-Ref(H,-2);
TD2:= L-Ref(L,-2);
TD3:= If((H>=Ref(L,-5) OR H>=Ref(L,-6)) AND (L<=Ref(H,-5) OR L<=Ref(H,-6)),1,0);
TD4:= If((Ref(H,-2)>=Ref(C,-7) OR Ref(H,-2)>=Ref(C,-8)) AND (Ref(L,-2)<=Ref(C,-7) OR Ref(L,-2)<=Ref(C,-8)),1,0);
TD6:= (TD1) + (TD2);
TD5:= If((TD3) + (TD4)>=1, (TD6), 0);
TD7:= Abs(TD1) + Abs(TD2);
TDREI:=((TD5) + Ref(TD5,-1) + Ref(TD5,-2) + Ref(TD5,-3) + Ref(TD5,-4))/ (TD7) + Ref(TD7,-1) + Ref(TD7,-2) + Ref(TD7,-3) + Ref(TD7,-4)*100;
TDREI; |
|
|