Help with a Stochastic Slow scanner script

crashed323

New member
Hello all,
I use the Stochastic Slow as one of my indicators on the Daily time frame.
The settings are
input over_bought = 80;
input over_sold = 20;
input KPeriod = 5;
input DPeriod = 1;

I want to be able to turn this into a scanner so that if a stock falls below the oversold range (under 20) it will show up on my scan.

I tried this for the code but this is not working for me. I also watched couple videos but i can't seem to get it to work. Any help would be appreciated.
Code:
input over_bought = 80;
input over_sold = 20;
input KPeriod = 5;
input DPeriod = 1;
input priceH = high;
input priceL = low;
input priceC = close;
input averageType = AverageType.SIMPLE;
input showBreakoutSignals = {default "No", "On SlowK", "On SlowD", "On SlowK & SlowD"};

def SlowK = reference StochasticFull(over_bought, over_sold, KPeriod, DPeriod, priceH, priceL, priceC, 3, averageType).FullK;
def SlowD = reference
StochasticFull(over_bought, over_sold, KPeriod, DPeriod, priceH, priceL, priceC, 3, averageType).FullD;
def OverBought = over_bought;
def OverSold = over_sold;

def Data = (SlowK[1] < SlowD[1]) and (SlowK > SlowD) ;
 

rad14733

Well-known member
VIP
@crashed323 Welcome to the usethinkscript forums...

It appears that you're making this out to be harder than it needs to be... Wouldn't it be easier to simply reference StochasticSlow.OverSold rather than trying to rewrite history...??? Doesn't the Scanner Conditional Wizard panel below display what you are looking for...??? You could just as easily use is less than or equal to...

HlQXHYM.png
 

Similar threads

Top