I am trying to include an indicator of ROC on the SlowK, when it turns positive. I would like to experiment with different limits. I am lining up the SlowK turning positive and the MACD Histogram beginning to increase. Here is what I have so far...
I would like to narrow my results to a sharply turning SlowK. Any thoughts? Thanks,
Code:
declare lower;
input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input averageTypeMACD = AverageType.EXPONENTIAL;
input showBreakoutSignalsMACD = no;
def Diff = MACD(fastLength, slowLength, MACDLength, averageTypeMACD).Diff;
input over_bought = 80;
input over_sold = 20;
input KPeriod = 10;
input DPeriod = 10;
input priceH = high;
input priceL = low;
input priceC = close;
input averageTypeStoch = AverageType.SIMPLE;
input showBreakoutSignalsStoch = {default "No", "On SlowK", "On SlowD", "On SlowK & SlowD"};
def SlowK = reference StochasticFull(over_bought,over_sold,KPeriod,DPeriod,priceH,priceL,priceC,3,averageTypeStoch).FullK;
def SlowD = reference StochasticFull(over_bought,over_sold,KPeriod,DPeriod,priceH,priceL,priceC,3,averageTypeStoch).FullD;
Plot DataProfile = (SlowK[1] < SlowK) and (lowest(slowK[1],3) <30) and(Diff[1] < Diff);
I would like to narrow my results to a sharply turning SlowK. Any thoughts? Thanks,
Last edited by a moderator: