DeMark's Indicator and REI Indicator
PUBLISHED: Page 98 and 100 of Tom Demark's new book, "The New Scienceof Technical Analysis" 1994.
COMMENTS: Note that the DeMark indicator on page 100 follows firstand iscontained in one formula only.
The REI (Range Expansion Index follows that and is contained over 5 formulas).
They could probably be compacted to one formula, but I felt that thisis more readable as Tom DeMark presents them in a similar manner.
DeMark's Indicator:
Code:
Sum(If(H, > ,Ref(H,-1),H-Ref(H,-1),0),13) /
(Sum(If(H, > ,Ref(H,-1),H-Ref(H,-1),0),13) +
Sum(If(L,>= ,Ref(L,-1),0,Ref(L,-1)-L),13))
Var1
If(Ref(H,-2),< ,Ref(C,-7),If(Ref(H,-2),<,Ref(C,-8),If(H,< ,Ref(L,-5),If(H,< ,Re f(L,- 6),0,1),1),1),1)
Var2
If(Ref(L,-2),> ,Ref(C,-7),If(Ref(L,-2),> ,Ref(C,-8),If(L,> ,Ref(H,-5),If(L,> ,Ref(H,- 6),0,1),1),1),1)
SubValues
( Fml("Var1") * Fml("Var2") * (H-Ref(H,-2))) + (Fml("Var1") * Fml("Var2") * (L-Ref(L,-2)) )
AbsDailyVal
( Abs(H-Ref(H,-2)) + Abs(L-Ref(L,-2)) )
REI Indicator
Sum(Fml("SubValues"),8) / Sum(Fml("AbsDailyVal"),8)
And for MetaStock 6.5 it should be like this:
DeMark's REI Indicator:
Code:
x1:=If(Ref(H,-2),< ,Ref(C,-7),
If(Ref(H,-2),<,Ref(C,-8),
If(H,<,Ref(L,-5),
If(H,<,Ref(L,- 6),0,1),1),1),1);
x2:=If(Ref(L,-2),> ,Ref(C,-7),
If(Ref(L,-2),>,Ref(C,-8),
If(L,>,Ref(H,-5),
If(L,>,Ref(H,- 6),0,1),1),1),1);
SubValues:=(x1) * (x2) * (H-Ref(H,-2) ) +((x1) * (x2) * (L-Ref(L,-2)) );
AbsDailyVal:=(Abs(H-Ref(H,-2)) + Abs(L-Ref(L,-2)));
Sum((SubValues),8) / Sum((AbsDailyVal),8)
|