John Bollinger mentions in his book that candles closing outside the BBs are not a sign of reversal, but a sign of continuation – until such time as a tag of the band is correlated with another indicator or candle reversal pattern.
I wanted to incorporate ‘walking the bands’ into a reversal trigger on minute charts, by using a scenario where 4 out of 5 recent candles have highs outside the band, followed by a close inside the bands.
The BB values need to be adjustable instead of 20/2.0, as JB himself states that short term traders look at values down to 15/1.5. Myself I use 16/1.8.
Below was my start, but I think it needs some expertise to make it work
walkend = close < BollingerUp[16](close)
high1 = high[1] >BollingerUp[16](1)
high2 = high[2] >BollingerUp[16](2)
high3 = high[3] >BollingerUp[16](3)
high4 = high[4] >BollingerUp[16](4)
high5 = high[5] >BollingerUp[16](5)
if ((high1 + high2 + high3 + high4 + high5) >= 4) and walkend then
w=1
else
w=0
endif
screener w
Hi, you forgot[] around w in last screener line, and used () where [] are needed for past 5 candles, high1 = high[1] >BollingerUp[16](1) should be:
high1 = high[1] >BollingerUp[16](close)[1]
You could also simply your sums with “summation”:
walkend = close < BollingerUp[16](close)
condition = summation[5](high[1]>BollingerUp[16](close)[1])>=4
w = condition and walkend
screener[w]