Hammer, shooting star, inverted hammer and hanging man screener
Forums › ProRealTime English forum › ProScreener support › Hammer, shooting star, inverted hammer and hanging man screener
- This topic has 7 replies, 3 voices, and was last updated 2 years ago by robertogozzi.
Tagged: hammer, hanging man, inverted, Inverted Hammer, shooting, shooting star, star
-
-
10/15/2020 at 2:43 PM #147488
Hi,
Can you help with a screener for Hammer, shooting star, inverted hammer and hanging man screener? and a small or no upper shadow for the hammer/hanging man and vice versa for the inverted hammer/shooting star.
I hope I made sense.
PS- I’ve looked up the link for the candlestick indicators but they come up different (less accurate if directly changed to screeners- they highlight less).
I’ll be grateful if you can help.
Thanks.
10/15/2020 at 3:12 PM #147492Some definitions can be found here:
https://www.prorealcode.com/prorealtime-indicators/candlestick-pattern-indicator-2-0/
https://www.prorealcode.com/prorealtime-indicators/candlestick-patterns-recognition/
if you disagree with those definitions, please post your own.
10/15/2020 at 3:23 PM #147493Hi,
Thanks for the response. I don’t disagree with them but they are indicators; I’m after screeners. Surely there’s a difference in the coding.
10/15/2020 at 3:25 PM #147494Maybe most of the visitors/members to this site are experienced but you’ll find that some of us are novices with no experience/capability in coding and need help.
10/15/2020 at 11:22 PM #147519Ok, I will code them with the definitions I found browsing the web (commented out variables are unused, but I included them for any future additions):
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152//Bullish = close > openBearish = close < openBody = abs(close - open)UpperShadow = high - max(open,close)LowerShadow = min(open,close) - low//TotalShadow = range - BodyTotal = 0//--------------------------------------------------------------------------------------------------------------------// Hammer//Ha1 = LowerShadow >= (Body * 3) //Lower Shadow 3 times longer than the bodyHa2 = close >= (high-(range * 0.25))//must close in the upper 25% of its rangeHa3 = low = lowest[20](low) //its Low must be the lowest one of the last 20 candles (1=disabled)Hammer = Ha1 AND Ha2 AND Ha3IF Hammer THENTotal = Total + 1ENDIF//--------------------------------------------------------------------------------------------------------------------// Shooting Star//Ss1 = UpperShadow >= (Body * 3) //Upper Shadow 3 times longer than the bodySs2 = LowerShadow <= Body //Lower Shadow must be max as large as the bodySs3 = close <= (low+(range * 0.25)) //must close in the lower 25% of its rangeSs4 = high = highest[20](high) //its High must be the highest one of the last 20 candles (1=disabled)ShootingStar = Ss1 AND Ss2 AND Ss3 AND Ss4IF ShootingStar THENTotal = Total + 2ENDIF//--------------------------------------------------------------------------------------------------------------------// Inverted Hammer//Ih1 = Bearish[1] //the first candle (the one to the left of the 2-candle pattern) is BearishIh2 = LowerShadow <= Body //Lower Shadow must be max as large as the bodyIh3 = UpperShadow >= (Body * 2.5) //Upper Shadow 2.5 times longer than the bodyIh4 = open <= close[1] //the open must be <= to the previous candle's closeInVertedHammer = Ih1 AND Ih2 AND Ih3 AND Ih4IF InVertedHammer THENTotal = Total + 4ENDIF//--------------------------------------------------------------------------------------------------------------------// Hanging Man//Hm1 = UpperShadow <= Body //Upper Shadow must be max as large as the bodyHm2 = LowerShadow >= (Body * 2) //Lower Shadow 2 times longer than the bodyHm3 = close >= (high - (range / 3)) //must close in the upper third of its rangeHangingMan = Hm1 AND Hm2 AND Hm3IF HangingMan THENTotal = Total + 8ENDIF//--------------------------------------------------------------------------------------------------------------------//SCREENER[Total](Total AS "Total")The result can be 1, 2, 4, 8 or any combinations of them (9 means that the current candlestick can be a Hanging Man or a Hammer, its position on the chart may help you tell one from the other).
4 users thanked author for this post.
10/19/2020 at 6:19 AM #147687Thanks a lot @robertogozzi. It works very well. You’re a star.
1 user thanked author for this post.
06/10/2022 at 1:53 PM #19505706/10/2022 at 2:59 PM #195065@moto
it was working fine on October 19th, 2020.
Is your code the SAME as above?
What isn’t working?
-
AuthorPosts
Find exclusive trading pro-tools on