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
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?).
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]
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
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
Replace line 30 with:
RETURN bullish OR bearish
or, if you want signals 1 and -1:
RETURN bullish OR -bearish,0