http://trader-online.tk/MSZ/e-w-Rela...l_formula.html

Relative Strength Index - Full Formula

100 - 100/ (1.+ If(Mov(If(P-Ref(P,-1)<0,-(P-Ref(P,-1)),0),23,E)=0,1000000,
Mov(If(P-Ref(P,-1)>0, P-Ref(P,-1), 0),23,E)/ Mov(If(P-Ref(P,-1)<0,-(P-Ref(P,-1)),0),23,E) ))



Nw:=DAYOFMONTH()<>ref(DAYOFMONTH(),-1);
n1:=9;
nc1:=valuewhen(1,nw,Ref(C,-1));
nc2:=valuewhen(n1+1,nw,Ref(C,-1));
rs1:=nc1-nc2;

p1:=1/n1;
RS:=If(nw,(p1*Ref(C,-1))+((1-p1)*PREV),PREV);

MTFRSI:=100-100/(1+(rs1/RS));
MTFRSI