Hi,
I have written the following formula for DTI_Trade indicator from William Blau's book.
But I do not get any output.
Can anyone help me?
HMU:=If((HIGH-Ref(HIGH,-1))>0 ,(HIGH-Ref(HIGH,-1)),0 );
LMU:=If((LOW-Ref(LOW,-1))<0 ,-(LOW-Ref(LOW,-1)),0 );
Resulta:=HMU-LMU;
rr:= Input("first smoothing r" ,1 ,100 ,25 );
ss:= Input("second smoothing s" ,1 ,100 ,13 );
uu:= Input("third smoothing u" ,1,100,1);
Value1:= 100*Mov(Mov(Mov(Resulta,rr,E),ss,E),uu,E);
Value2:= Mov(Mov(Mov((Abs(Resulta)),rr,E),ss,E),uu,E);
Value3 := If(Value20 ,Value1/Value2 ,0 );
HMU1:=If((Ref(HIGH, -1)-Ref(HIGH,-2))>0 ,(Ref(HIGH,-1)-Ref(HIGH,-2)),0 );
LMU1:=If((Ref(LOW,-1)-Ref(LOW,-2))<0 ,-(Ref(LOW,-1)-Ref(LOW,-2)),0 );
Resultb:=HMU1-LMU1;
Value11:= 100*Mov(Mov(Mov(Resultb,rr,E),ss,E),uu,E);
Value21:= Mov(Mov(Mov((Abs(Resultb)),rr,E),ss,E),uu,E);
Value31 := If(Value210 ,Value11/Value21 ,0 );
Value4 := If(Value3 - Value31 > 0 AND Value3 > 0 , Value3, 0);
Value5 := If(Value3 - Value31 < 0 AND Value3 < 0 , Value3, 0);
Result := Value4 + Value5;
Regards
Rupa