_$Num1=C-Lowest(L,STLen);
_$Denom1=Highest(H,STLen)-Lowest(L,STLen);
_$Ratio1=IFF(_$Denom1>0,(_$Num1/_$Denom1)*100,_$Ratio1[1]);
_$PctK1=IFF(CurrentBar=1,_$Ratio1,_$PctK1[1]+(.5*(_$Ratio1-_$PctK1[1])));
{Stoc-2}
_$Num2=_$PctK1-Lowest(_$PctK1,STLen);
_$Denom2=Highest(_$PctK1,STLen)-Lowest(_$PctK1,STLen);
_$Ratio2=IFF(_$Denom2>0,(_$Num2/_$Denom2)*100,_$Ratio2[1]);
_$PctK2=IFF(CurrentBar=1,_$Ratio2,_$PctK2[1]+(.5*(_$Ratio2-_$PctK2[1])));
plot1(_$PctK2,"stoc");
Tried it with the stochastic ninjatrader code, but failed to get the right result....
Could someone help me out converting above code to NT code?
greetings,
Bart
Comment