Hammer on EMA5 screener
Forums › ProRealTime English forum › ProScreener support › Hammer on EMA5 screener
- This topic has 6 replies, 2 voices, and was last updated 4 years ago by MrMagic.
Tagged: hammer
-
-
06/13/2020 at 7:11 PM #135845
Dear all,I wonder if you could help me please. I posted this already before. Tried unsuccessfully to code this. I’d like a screener to fulfil the following criteria:
LONG
1. Price closes above EMA5
2. Bullish hammer crosses and rests on EMA5
3. EMA5 above EMA20
4. ADX above 25
SHORT
1. Price closes below EMA5
2. Bearish hammer crosses and rests on EMA5
3. EMA5 below EMA20
4. ADX above 25
Any help is appreciated.
Thanks.
06/14/2020 at 10:33 AM #135879There you go (non tested):
12345678910111213141516171819Ema5 = average[5,1](close)Ema20 = average[20,1](close)MyAdx = Adx[14]Body = abs(close - open)UpperShadow = high - max(open,close)LowerShadow = min(open,close) - lowBullishHammer = (Body <= (LowerShadow * 0.30)) AND (UpperShadow <= (Body * 0.10))BearishHammer = (Body <= (UpperShadow * 0.30)) AND (LowerShadow <= (Body * 0.10))L1 = close Crosses Over Ema5L2 = Ema5 > Ema20L3 = MyAdx > 25L4 = low <= Ema5Lcond = L1 and L2 and L3 and L4 and BullishHammerS1 = close Crosses Under Ema5S2 = Ema5 < Ema20S3 = MyAdx > 25S4 = high >= Ema5Scond = S1 and S2 and S3 and S4 and BearishHammerScreener[Lcond or Scond]1 user thanked author for this post.
06/14/2020 at 9:01 PM #135925Thanks a lot @robertogozzi. I’ll test it and get back to you. Bless.
06/15/2020 at 8:12 AM #135949Hi @robertogozzi, I tried the screener but it didn’t come up with any instruments even though manually, I could see the hammers form on EMA5.
06/15/2020 at 8:45 AM #135962Please report instrument, TF, date and time, so I can check what’s wrong.
06/15/2020 at 10:57 AM #135987It works, despite returning very few signals. I selected ALL shares, currencies and Indices, but only 11 items were found matching the conditions (see attached pic).
I also realized that, due to the above Hammer difinition, there can be (though rare) times when both signals are true, so I suggest that you get rid of line 19 and append these lines, instead:
12345IF Scond AND Lcond THENLcond = 0Scond = 0ENDIFScreener[Lcond or Scond]06/30/2020 at 7:47 PM #137802Hi @robertogozzi, thanks for the code. It works just like you described, few but valid hammers.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on