Hammer, shooting star, inverted hammer and hanging man screener

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #147488 quote
    James.adejare
    Participant
    New

    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.

    #147492 quote
    robertogozzi
    Moderator
    Master
    #147493 quote
    James.adejare
    Participant
    New

    Hi,

    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.

    #147494 quote
    James.adejare
    Participant
    New

    Maybe 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.

    #147519 quote
    robertogozzi
    Moderator
    Master

    Ok, 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):

    //Bullish      = close > open
    Bearish        = close < open
    Body           = abs(close - open)
    UpperShadow    = high - max(open,close)
    LowerShadow    = min(open,close) - low
    //TotalShadow  = range - Body
    Total          = 0
    //--------------------------------------------------------------------------------------------------------------------
    // Hammer
    //
    Ha1            = LowerShadow >= (Body * 3)     //Lower Shadow 3 times longer than the body
    Ha2            = close >= (high-(range * 0.25))//must close in the upper 25% of its range
    Ha3            = low = lowest[20](low)         //its Low must be the lowest one of the last 20 candles (1=disabled)
    Hammer         = Ha1 AND Ha2 AND Ha3
    IF Hammer THEN
       Total = Total + 1
    ENDIF
    //--------------------------------------------------------------------------------------------------------------------
    // Shooting Star
    //
    Ss1            = UpperShadow >= (Body * 3)     //Upper Shadow 3 times longer than the body
    Ss2            = LowerShadow <= Body           //Lower Shadow must be max as large as the body
    Ss3            = close <= (low+(range * 0.25)) //must close in the lower 25% of its range
    Ss4            = 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 Ss4
    IF ShootingStar THEN
       Total = Total + 2
    ENDIF
    //--------------------------------------------------------------------------------------------------------------------
    // Inverted Hammer
    //
    Ih1            = Bearish[1]                    //the first candle (the one to the left of the 2-candle pattern) is Bearish
    Ih2            = LowerShadow <= Body           //Lower Shadow must be max as large as the body
    Ih3            = UpperShadow >= (Body * 2.5)   //Upper Shadow 2.5 times longer than the body
    Ih4            = open <= close[1]              //the open must be <= to the previous candle's close
    InVertedHammer = Ih1 AND Ih2 AND Ih3 AND Ih4
    IF InVertedHammer THEN
       Total = Total + 4
    ENDIF
    //--------------------------------------------------------------------------------------------------------------------
    // Hanging Man
    //
    Hm1            = UpperShadow <= Body           //Upper Shadow must be max as large as the body
    Hm2            = LowerShadow >= (Body * 2)     //Lower Shadow 2 times longer than the body
    Hm3            = close >= (high - (range / 3)) //must close in the upper third of its range
    HangingMan     = Hm1 AND Hm2 AND Hm3
    IF HangingMan THEN
       Total = Total + 8
    ENDIF
    //--------------------------------------------------------------------------------------------------------------------
    //
    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).

    #147687 quote
    James.adejare
    Participant
    New

    Thanks a lot @robertogozzi. It works very well. You’re a star.

    robertogozzi thanked this post
    #195057 quote
    moto
    Participant
    New

    There must be something wrong, it does´t work. Thanks anyway

    #195065 quote
    robertogozzi
    Moderator
    Master

    @moto

    it was working fine on October 19th, 2020.

    Is your code the SAME as above?

    What isn’t working?

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

Hammer, shooting star, inverted hammer and hanging man screener


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 7 replies,
has 3 voices, and was last updated by robertogozzi
3 years, 9 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 10/15/2020
Status: Active
Attachments: No files
Logo Logo
Loading...