Doji entry scanner

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #30607 quote
    Jon88
    Participant
    Junior

    I read Nicolas post ‘Candlestick patterns recognition’ (https://www.prorealcode.com/prorealtime-indicators/candlestick-patterns-recognition/).

    Could someone help to create this scanner idea I have.

    Trigger: Doji on 1 hr daily frame, that occur  within Daily pivot points (or in R2, R1, S1, S2 …etc). See image for example what I mean…

     

    Not even sure if it’s possible to do

    Screen-Shot-2017-04-01-at-13.25.01.png Screen-Shot-2017-04-01-at-13.25.01.png
    #31021 quote
    Nicolas
    Keymaster
    Master

    This example should be a sell signal, so I guess you also need the same for bullish signals too? (low of the Doji is crossing one of the pivots points?).

    #32681 quote
    Jon88
    Participant
    Junior

    That’s right Nicolas

    #32694 quote
    Nicolas
    Keymaster
    Master

    This is the code for your stock screener to find doji candlestick piercing pivots points (bearish signals when the high crosses one of the pivot points and bullish ones when it is the low of the candle).

    // --- settings
    DojiSize = 20 //x% percent of body size compared to the complete range of the candlestick
    mode = 1 //Pivot calculation method
    // ---
    
    If Day>Day[1] then
    If mode = 0 then
    Pivot = (DHigh(1) + DLow(1) + Close[1]) / 3
    Elsif mode = 1 then
    Pivot = (Open + DHigh(1) + DLow(1) + Close[1]) / 4
    Elsif mode = 2 then
    Pivot = (DHigh(1) + DLow(1) + Close[1]*2) / 4
    Else
    Pivot = (Open*2 + DHigh(1) + DLow(1)) / 4
    Endif
    R1 = 2*Pivot - DLow(1)
    S1 = 2*Pivot - DHigh(1)
    rR2 = Pivot + (DHigh(1) - DLow(1))
    S2 = Pivot - (DHigh(1) - DLow(1))
    R3 = R1 + (DHigh(1) - DLow(1))
    S3 = S1 - (DHigh(1) - DLow(1))
    Endif
    
    doji=(abs(open - close) <= (high - low) * DojiSize/100)
    
    bullish = doji and (high crosses over pivot or high crosses over r1 or high crosses over s1 or high crosses over rr2 or high crosses over s2 or high crosses over r3 or high crosses over s3)
    
    bearish = doji and (low crosses under pivot or low crosses under r1 or low crosses under s1 or low crosses under rr2 or low crosses under s2 or low crosses under r3 or low crosses under s3)
    
    screener [bullish OR bearish]
    doji-stock-screener-pivot-points.png doji-stock-screener-pivot-points.png
    #32821 quote
    Jon88
    Participant
    Junior

    If I want to change the daily pivot to monthly or weekly . Do I just change line 6 to ‘month’ or ‘weekly’?

    If I want to combine another candlestick with Doji (i.e. bearish/bullish Hammer), what would the code be?

    I know this is pain in the a***, but I would be very much greatful.

    Thanks

    #114750 quote
    cornbro
    Participant
    New

    hi amigos, trying to pick up the coding here

    what amendments would we need to change a screener into an indicator? i am trying to identify a bullish signal as +1 (hammer, dragonfly doji, inverted hammer)  and bearish signal as -1 (hanging man, gravestone doji)

     

    thnks

    #114753 quote
    robertogozzi
    Moderator
    Master

    Replace line 30 with:

    RETURN bullish OR bearish

    or, if you want signals 1 and -1:

    RETURN bullish OR -bearish,0
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Doji entry scanner


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Jon88 @jon88 Participant
Summary

This topic contains 6 replies,
has 4 voices, and was last updated by robertogozzi
6 years, 2 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 04/01/2017
Status: Active
Attachments: 2 files
Logo Logo
Loading...