Dear ProRealCode Community,
Happy New Year. I am looking to have a custom screener, and I would greatly appreciate your expertise. My objective is to identify stocks that meet the following criteria:
1.Price and Volume Parameters:
•Price closes above the EMA50.
•Stock price is less than $10.
•Relative volume is 1.5 or above
•Total volume is 1 million or above.
2.Technical Indicators:
•MACD: Should be bullish.
•Stochastic Oscillator:
•Preferably about to cross over to bullish.
•Include scenarios where there is a stochastic is bearish but moving towards bullish.
•Highlight instances where the bullish crossover has occurred within the last two candles.
I know this is quite a detailed set of criteria, but I would sincerely appreciate your help in creating this screener. Your insights and assistance would mean a lot, and I’m more than happy to provide further clarifications if needed.
Thanks in advance
JSParticipant
Senior
Happy New Year.
Check this first try:
// Screener for identifying stocks that meet the following criteria:
// - Price closes above EMA50
// - Stock price is less than $10
// - Relative volume ≥ 1.5
// - Total volume ≥ 1 million
// - MACD is bullish
// - Stochastic Oscillator:
// 1. About to cross bullish
// 2. Highlight recent bullish crossover (within the last 2 candles)
// Define Parameters
EMA50 = Average[50,1](Close) // EMA50
RelativeVolume = Volume / Average[50](Volume)
StochasticK = Stochastic[14,1](Close)
xStochasticD = Average[3](StochasticK)
xMACD = MACD[12,26,9](Close) - MACDLine[12,26,9](Close)
// Define Conditions
c1 = Close > EMA50 // Price closes above EMA50
c2 = Close < 10 // Stock price less than $10
c3 = RelativeVolume >= 1.5 // Relative volume ≥ 1.5
c4 = Volume >= 1000000 // Total volume ≥ 1 million
c5 = xMACD > 0 // MACD is bullish
// Stochastic Conditions
isBullishCross = StochasticK[1] < xStochasticD[1] AND StochasticK > xStochasticD
RecentBullishCross = isBullishCross OR (StochasticK[2] < xStochasticD[2] AND StochasticK[1] >= xStochasticD[1])
// Combine All Conditions
Filter = c1 AND c2 AND c3 AND c4 AND c5 AND (isBullishCross OR recentBullishCross)
// Screener Output
SCREENER[Filter](Close AS "Close Price", relativeVolume AS "Rel. Vol.", Volume AS "Total Vol.")
Thanks for the screener. It brings up a good number of stocks but MACD remains bearish in some picks.
JSParticipant
Senior
Sometimes the differences in a screener are due to not adjusting the data after dividend, do you have this setting correct?
(see screenshot: Historische data aanpassen)
Hi,
Thanks for the response. Checked and correct. MACD remains bearish despite all settings changed
JSParticipant
Senior
Try this version…
// Screener for identifying stocks that meet the following criteria:
// - Price closes above EMA50
// - Stock price is less than $10
// - Relative volume ≥ 1.5
// - Total volume ≥ 1 million
// - MACD is bullish
// - Stochastic Oscillator:
// 1. About to cross bullish
// 2. Highlight recent bullish crossover (within the last 2 candles)
// Define Parameters
EMA50 = Average[50,1](Close) // EMA50
RelativeVolume = Volume / Average[50](Volume)
StochasticK = Stochastic[14,1](Close)
xStochasticD = Average[3](StochasticK)
xMACD = MACD[12,26,9](Close)
// Define Conditions
c1 = Close > EMA50 // Price closes above EMA50
c2 = Close < 10 // Stock price less than $10
c3 = RelativeVolume >= 1.5 // Relative volume ≥ 1.5
c4 = Volume >= 1000000 // Total volume ≥ 1 million
c5 = xMACD > 0 // MACD is bullish
// Stochastic Conditions
isBullishCross = StochasticK[1] < xStochasticD[1] AND StochasticK > xStochasticD
RecentBullishCross = isBullishCross OR (StochasticK[2] < xStochasticD[2] AND StochasticK[1] >= xStochasticD[1])
// Combine All Conditions
Filter = c1 AND c2 AND c3 AND c4 AND c5 AND (isBullishCross OR recentBullishCross)
// Screener Output
SCREENER[Filter](Close AS "Close Price", relativeVolume AS "Rel. Vol.", Volume AS "Total Vol.")
Hi,
Thanks. Works very well. Will test it out even more and feedback.
KR