In Tradestation I use an indicator, the B-line, which is a kind of LT stochastic indicator. Originally developed by Judy McKeigan ( Buffy) at dacharts.com.
I'm not familiar with the Ninja program code. Therefore I have copied the TS code of the B-line.
Input: Price(Close), Length1(35), Length2(10), Length3(1), OverBought(80), OverSold(20),
MidColor(White),OBOSColor(Red);
Variables: KFast(0), KFull(0), DFull(0), LL(O), HH(0);
LL = Lowest((High+Low)/2, Length1);
HH = Highest((High+Low)/2, Length1);
KFast = 100 * IFF(HH-LL=0,0,(((High+Low)/2) - LL)/(HH- LL));
KFull = Average(KFast, Length2);
DFull = Average(KFull, Length3);
If KFull <= 80 and KFull >= 20 then
Plot1(KFull,"Stoc",MidColor,Default,2) else
Plot1(KFull,"Stoc",OBOSColor,Default,2);
Plot3(OverBought, "OverBought");
Plot4(OverSold, "OverSold");
I hope that someone can translate this into Ninja code.
Jaap
Comment