Is it possible to screen for two candlesticks of near equal size that are either bullish/bearish or bearish bullish that have broken the Bollinger bands? A recent example from the S & P 500 attached. Many thanks.
JSParticipant
Senior
Hi,
Try this…
You can set the percentage difference in body and price (currently max. 2%)
Once PercBodyDiff=2//Max.2% body difference
Once PercPriceDiff=2//Max.2% price difference
c1=Open[1]<BollingerUp[20][1] and Close[1]>BollingerUp[20][1]//Bullish
c2=Open>BollingerUp[20] and Close<BollingerUp[20]//Bearish
c3=Open[1]>BollingerDown[20][1] and Close[1]<BollingerDown[20][1]//Bearish
c4=Open<BollingerDown[20] and Close>BollingerDown[20]//Bullish
BodySize0=Abs(Close-Open)
BodySize1=Abs(Close[1]-Open[1])
c5=Abs((BodySize1-BodySize0)/BodySize1)*100<PercBodyDiff
c6=Abs((Open-Close[1])/Close[1])*100<PercPriceDiff
Screener[(c1 and c2 and c5 and c6) or (c3 and c4 and c5 and c6)]
Thank you. That’s very helpful and seems to be working well on the S & P 500 right now. How to turn that code into bearish? How to add a gap up or down say in the last 7 days after the pattern appears?
JSParticipant
Senior
The screener is for both bullish and bearish…
JSParticipant
Senior
Your added question about the “gap” and having the “train track” pattern play in the past will change the whole screener…