//bullish trend
EMA1 = exponentialaverage[20](close)
EMA2 = exponentialaverage[50](close)
bullish = Close>EMA1 AND Close>EMA2 AND EMA1>EMA2
//near 52 week highest price
FiftyTwoWeekHigh = highest[250](high)
FivePercentBelow = 1-(Close/FiftyTwoWeekHigh)<5/100
//the recent 52 week high were created at least 3 days ago
if FiftyTwoWeekHigh = FiftyTwoWeekHigh[1] AND FiftyTwoWeekHigh = FiftyTwoWeekHigh[2] AND FiftyTwoWeekHigh = FiftyTwoWeekHigh[3] THEN
AtLeast3DaysAgo = 1
ELSE
AtLeast3DaysAgo = 0
ENDIF
//recent volume
AllConditions = bullish AND FivePercentBelow AND AtLeast3DaysAgo = 1
SCREENER [AllConditions]
Good Morning I am looking for a clever person who knows how to code these to make a screener exactly the opposite as to what has been coded here to detect stocks that are breaking down
if anyone can do this it would be greatly appreciated 🙂
Hello kajsy88, good to see you here.
Would you mind introduce yourself here : http://www.prorealcode.com/forum/announcements/forums-new-members/
I’ll have a look to your request.
Here is the code for the bearish side of this stock screener.
//bearish trend
EMA1 = exponentialaverage[20](close)
EMA2 = exponentialaverage[50](close)
bearish = Close<EMA1 AND Close<EMA2 AND EMA1<EMA2
//near 52 week lowest price
FiftyTwoWeekLow = lowest[250](high)
FivePercentAbove = Close<FiftyTwoWeekLow*1.05
//the recent 52 week low were created at least 3 days ago
if FiftyTwoWeekLow = FiftyTwoWeekLow[1] AND FiftyTwoWeekLow = FiftyTwoWeekLow[2] AND FiftyTwoWeekLow = FiftyTwoWeekLow[3] THEN
AtLeast3DaysAgo = 1
ELSE
AtLeast3DaysAgo = 0
ENDIF
AllConditions = bearish AND FivePercentAbove AND AtLeast3DaysAgo = 1
SCREENER [AllConditions]
Enjoy.
Does it make the trick kajsy88?
I think this
//near 52 week lowest price
FiftyTwoWeekLow =lowest[250](high)
should be (low)…?
Good point Max! You are absolutely right 🙂
I must be learning something then 😉
Also – If I am understanding correctly what the FiftyTwoWeekLow (and high in the bullish screener) is actually ‘asking’ (a new 52 Week Low that has been running for at least the last 3 days) then need the following added to the IF/THEN condition (Otherwise the results I was getting have lower 52 week lows…)
AND FiftyTwoWeekLow < FiftyTwoWeekLow[4] THEN
It’s possible to make a verison of this indicator for Forex?
This code should actually work for Forex pairs, why do you think it is not?
Because the breakdown screener finds at most 11 criteria, while the original breakout 12. So probably there is an incompatibility with the currencies, or the two codes are different or wrong.
I’m not sure to understand what you mean. The 2 codes present on this page are different, the first one is looking for bullish breakout while the second one is for the bearish ones.
Yes i know, but look at the attachments.
The bearish one show at maximum 11 criterias when finding the currencies pairs, while the bullish 12. Why should this happen if they are “specular”?
I was looking at these screener since a week and the maximum is always this.
I still don’t know what you mean since the screeners codes on this page don’t have any sorting criteria! I think you are talking about another code? Would you mind posting it? In order to talk about the same exact thing 😉
I don’t know Nicolas, i just put the screeners in my PRT and they automatically started sorting by criteria… sorry for confusing you but I’m a novice.
So basically everithing that the screener shows is eligible for a breakout, now it’s clear and sorry again.
Just a last question: What could i evaluate simultaneously to perfect the bullish and bearish breakout search in your opinion?
i just put the screeners in my PRT and they automatically started sorting by criteria
I put both the Bullish and Bearish Screeners in my PRT and I don’t get any Criteria sorting or numbers in the Criteria column … see attached.