Type : Indicator, Name : Reverse Engineering
Input: OVERBGHT(45), OVERSOLD(-45),REI_BARS(5);
Var:Cond1(0), Cond2(0), D(0), SumD(0), Cnt(0), REI(0);
If (H<L[5] and H<L[6]) and (H[2] < C[7] and H[2] < C[8])
then Cond1=0 Else Cond1=1;
If (L>H[5] and L>H[6]) and (L[2] > C[7] and L[2] > C[8])
then Cond2=0 Else Cond2=1;
If Cond1=1 and Cond2=1 then D=(H-H[2])+(L-L[2]) else D=0;
SumD=0;
For cnt =0 to REI_BARS-1 begin
SumD=SumD+D[cnt];
End;
REI = (100/REI_BARS)*SumD/(Highest(H,REI_BARS) — Lowest(L,REI_BARS));
Plot1(REI,»TDC.REI»);
Plot2(OVERBGHT,»OverBght»);
Plot3(OVERSOLD,»OverSold»);