Boston
Posts: 5 since Feb 2019
Thanks Given: 1
Thanks Received: 2
|
SRSI (S&C feb 2019 by Howard Wang) ELS
inputs: length(20);
vars: srsi(0), srsin(0),k(0);
srsin=0;
for k=0 to length-1
Begin
Value1=absvalue(close[k]-open[k]);
Value1=absvalue(high[k]-low[k]);
if value2 =0 then value3=0
else
value3=value1/value2;
srsin=srsin+value3;
end;
srsi=srsin/length;
plot1(0.38);
plot2(srsi);
plot3(-0.38);
plot4(0);
//////###below my attempt to convert to TOS it plots something but does not oscilate between + and - help appreciated
declare lower;
input Length = 20;
plot srsi = (fold k = 0 to length-1 with srsin = 0 do srsin+
getvalue(if AbsValue(high[k]-low[k]) == 0
then AbsValue(close[k]-open[k])/AbsValue(high[k]-low[k])==0
else (AbsValue(close[k]-open[k])/AbsValue(high[k]-low[k])),k,length))/length;
plot upper = 0.38;
plot zero = 0;
plot lower = -0.38;
|