MetaStock code for H, L, RSIL, RSIH, RevEngRSIL, and RevEngRSIH
-------------------------
{High}
H
-------------------------
{Low}
L
-------------------------
{RSIL}
WildPer:=Input("Wilder Time Periods",1, 100,14);
ExpPer:=2*WildPer-1;
eps:=0.000000001;
{Average Up Low}
AUL:=Mov( If(L>Ref(L,-1), L-Ref(L,-1), 0), ExpPer, E);
{Average Down Low}
ADL:=Mov( If(Ref(L,-1)>L, Ref(L,-1)-L, 0), ExpPer, E);
(AUL+eps)/(AUL+ADL+eps)*100;
-------------------------
{RSIH}
WildPer:=Input("Wilder Time Periods",1, 100,14);
ExpPer:=2*WildPer-1;
eps:=0.0000000001;
{Average Up High}
AUH:=Mov( If(H>Ref(H,-1), H-Ref(H,-1), 0), ExpPer, E);
{Average Down High}
ADH:=Mov( If(Ref(H,-1)>H, Ref(H,-1)-H, 0), ExpPer, E);
RSIH:=(AUH+eps)/(AUH+ADH+eps)*100;
RSIH
--------------------------
{RevEngRSIL}
value:=Input("RSIL value", 1, 100,50);
WildPer:=Input("Wilder Time Periods",1, 100,14);
ExpPer:=2*WildPer-1;
{Average Up Low}
AUL:=Mov( If(L>Ref(L,-1), L-Ref(L,-1), 0), ExpPer, E);
{Average Down Low}
ADL:=Mov( If(Ref(L,-1)>L, Ref(L,-1)-L, 0), ExpPer, E);
x:=(WildPer-1)*(ADL*value/(100-value)-AUL);
RevEngRSIL:=If(x>=0, L+x, L+x*(100-value)/value);
RevEngRSIL
-------------------------
{RevEngRSIH}
value:=Input("RSIH value", 1, 100,50);
WildPer:=Input("Wilder Time Periods",1, 100,14);
ExpPer:=2*WildPer-1;
{Average Up High}
AUH:=Mov( If(H>Ref(H,-1), H-Ref(H,-1), 0), ExpPer, E);
{Average Down High}
ADH:=Mov( If(Ref(H,-1)>H, Ref(H,-1)-H, 0), ExpPer, E);
x:=(WildPer-1)*(ADH*value/(100-value)-AUH);
RevEngRSIH:=If(x>=0, H+x, H+x*(100-value)/value);
RevEngRSIH
--------------------------
-G.S.