Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
Welcome :D
Here is a formula you could try :wink:
tp:= Input("time periods for RSI",2,200,14);
new:=Mod(Cum(1),5)=0;
plot:= C;
change:= ROC(plot,5,$);
Z1:=If(new,If(change>0,change,0),0);
Z:=If(Cum(1)=tp*5,Cum(Z1)/tp,If(new,(PREV*(tp-1)+Z1)/tp,PREV));
Y1:=If(new,If(change<0,Abs(change),0),0);
Y:=If(Cum(1)=tp*5,Cum(Y1)/tp,If(new,(PREV*(tp-1)+Y1)/tp,PREV));
temp:= If(Y=0,-1,Y);
RS:= If(temp=-1,0,Z/temp);
If(BarsSince(Cum(1)=tp*5)>=0,100-(100/(1+RS)),0)
Patrick :mrgreen:
|