This stock screener find stocks that are/were in oversold territory by finding if their RSI and Stochastic were below the 30 and 20 percent level within the last “period” (10 days = setting that can be changed in the code).
If the stocks is currently rising from its last bottom and if it was stopped on a ‘sweet spot’ (support levels of any kind), it may be a suitable level to buy the stock. The screener is catching a new momentum rising in the last ‘period’ bars to confirm the beginning of a new bullish momentum.
//PRC_Oversold and Rising Momentum | screener
//19.04.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
myrsi = rsi[14]
sto = stochastic[10,3]
avgsto = average[6](sto)
mom = momentum[10]
period=10
c1 = summation[period](myrsi<30)>0
c2 = summation[period](sto<20)>0
c3 = summation[period](sto crosses over avgsto)>0
c4 = summation[period](mom>mom[1])>=0.8*period
test = c1 and c2 and c3 and c4
SCREENER [test] (close as "close")