So far I have been unable to find anything close to this in a NinjaScript.
Can anyone provide some input on how to modify this for NT7?
Thanks!
JJ
=====================================
The TradeStation "EasyLanguage"...
{StoRSI}
inputs: RSILen(13), StoLen(8), MA(5), MA2(5);
vars: PV(0), pvt(0), pvb(0);
vars: OverBought(80), OverSold(20);
Vars: Sum(0), Counter(0);
pvt = RSI(Close, RSILen) - Lowest(RSI(Close, RSILen), STOLen);
pvb = Highest(RSI(Close, RSILen), STOLen) - Lowest(RSI(Close, RSILen), STOLen);
Sum = 0;
For counter = 0 To MA - 1 Begin
pvt = (RSI(Close, RSILen) - Lowest(RSI(Close, RSILen), STOLen)) of counter bars ago;
pvb = (Highest(RSI(Close, RSILen), STOLen) - Lowest(RSI(Close, RSILen), STOLen)) of counter bars ago;
PV = iff(pvb > 0, pvt/pvb, 0);
Sum = Sum + PV;
End;
PV = iff(MA > 0, Sum / MA, 0);
plot1(PV*100, "StoRSI");
plot2(average(PV,MA2)*100, "StoRSI2");
plot3(OverBought, "OB");
plot4(OverSold, "OS");
==============================
Comment