Hi,
Objective:
Price is fast approaching support line of 52 week lows and looks to be breaking out to the downside anytime soon. I want to identify trades to short into bearish breakout just before price breaks the support line.
Example:
Overstock.com (OSTK) – 11 Nov 2019
Cooper Standard Holding (CPS) – 15 Nov 2019
(see attached pictures)
Criteria: (All on Daily Timeframe)
- Price below SMA50
- Price is 0-3% above 52 Week Low
- Average Volume is over 50k
- Price is over $2
- *MACD line minus Signal line nearing to zero*
Would you be able to turn this into code please?
There you go, you can change value to suit your needs best:
Timeframe(Weekly)
LL = lowest[52](low)
//
Timeframe(Daily)
c1 = close < average[50,0](close)
p0 = close >= LL
p1 = close <= (LL * 1.03)
c2 = p0 And p1
c3 = average[50,0](volume) > 50000
c4 = close > 2
c5 = abs(Macd[12,26,9]) <= 2
//
Timeframe(default)
Result = c1 and c2 and c3 and c4 and c5
Screener[Result]
Thanks Robert,
That would have taken me hours to work out.
I made some amendments to the MACD part of the code.
However the screener still seems to be pulling up stocks with the current closing price below the 52 week low. I cant seem to work out why.
I won’t be able to open and test your version till tomorrow.
You may have received an email about a wrong post I deleted. Ognore it, please. 🙂
Can you post some examples of instruments scanned but out of the rquired selection criteria?
SLCA, EZPW are both being included in the screener but they are below the 52 week low.
I think I have worked out what it is but I am not sure how to add it to the code.
I believe it is considering the the 52 week low as the lowest price that he stock has hit before the close of the current period. I need to add that the 52 week low needs to be prior to the current period so that if the stock breaks to new lows it will not be included in the screener.
Thanks