rmwaddelljr

BB 100 with Barcolors

315 0 29
6/19/15 I added confirmation highlight bars to the code. In other words, if a candle bounced off the lower Bollinger band , it needed one more close above the previous candle to confirm a higher probability that a change in investor sentiment has reversed. Same is true for upper Bollinger band bounces. I also added confirmation highlight bars to the 100 sma (the basis). The idea is that lower and upper bands are potential points of support and resistance . The same is true of the basis if a trend is to continue. 6/28/15 I added a plotshape to identify closes above/below TLine. One thing this system points out is it operates best in a trend reversal. Consolidations will whipsaw the indicator too much. I have found that when this happens, if using daily candles, switch to hourly, 30 min, etc., to catch a better signal. Nothing moves in a straight line. As with any indicator, it is a tool to be used in conjunction with the art AND science of trading. As always, try the indicator for a time so that you are comfortable enough to use real money. This is designed to be used with "BB 25 with Barcolors".
snapshot
Remove from Favorite Scripts Add to Favorite Scripts
// BB 100 with Barcolors by Robert Waddell
// I came across an unusual Bollinger Band setup where they use 100 sma and a 25 (not 20) sma.
// I've seen it traded on a 1 hr chart.  I noticed that the combo (100 & 25) produced interesting
// results with bounces off the hourly chart.  you have to load the BB 25 with barcolors
// and the BB 100 with Barcolors seperately.  Also, repo32's "BuySellEMA" is included in the chart
// and provides 8EMA buy/sell signals.  If you see something that needs changing, go for it.


study(title ="BB 100 with Barcolors", overlay = true)
length = input(100, minval=1, title="Length") 

TLineEMA = input(8, minval=1, title="Trigger Line")
TLine = ema(close, TLineEMA)
aboveTLine = close > TLine
belowTLine = close < TLine

src = input(close, title="Source")
mult = input(2.0, minval=0.001, maxval=50)
basis = sma(src, length)
dev = mult * stdev(src, length)
source = close
upperBB = basis + dev
lowerBB = basis - dev
b1 = plot(basis, color=gray, linewidth=1)
p1 = plot(upperBB, color=red,  linewidth=1)
p2 = plot(lowerBB, color=red, linewidth=1)


ubcrossup = (src[1] < upperBB[1] and src > upperBB[1] ? 1 : 0)
ubcrossdown = (src[1] > upperBB[1] and src < upperBB[1] ? 1 : 0)
lbcrossup = (close[1] < lowerBB[1] and src > lowerBB[1] ? 1 : 0)
lbcrossdown = (src[1] > lowerBB[1] and src < lowerBB[1] ? 1 : 0)
crossupbasis = (src[3] < basis[2] and src[2] < basis[1] and src[1] < basis[1] and src > basis[1] ? 1 : 0)
crossdownbasis = (src[1] > basis and src < basis[1] ? 1 : 0)
confirmlbup = (src[2] < lowerBB[2] and src[1] > lowerBB[1] and src > src[1] and aboveTLine ? 1 : 0)
cnfmaggrlbup = (close[2] < lowerBB[2] and src[1] > lowerBB[1] and src > src[1] ? 1 : 0)
confirmlbdown = (src[2] > lowerBB[2] and src[1] < lowerBB[1] and src < src[1] and belowTLine ? 1 : 0)
confirmubup = (src[2] < upperBB[2] and src[1] > upperBB[1] and src > src[1] and aboveTLine ? 1 : 0)
confirmubdown = (src[2] > upperBB[2] and src[1] < upperBB[1] and src < src[1] and belowTLine ? 1 : 0)
confirmbasisup = (src[2] < basis[2] and src[1] > basis[1] and src > src[1] and aboveTLine ? 1 : 0)
confirmbasisdown = (src[2] > basis[2] and src[1] < basis[1] and src < src[1] ? 1 : 0)


plotshape(close[1] > TLine[1] and close < TLine, location=location.belowbar, color = fuchsia, style = shape.diamond)
plotshape(close[1] < TLine[1] and close > TLine, location=location.abovebar, color = lime, style = shape.diamond)

barcolor(ubcrossup and close > open ? lime : na)
barcolor(ubcrossdown and close < open ? red : na)
barcolor(lbcrossup and close > open ? lime : na)
barcolor(lbcrossdown and close < open ? red : na)
barcolor(crossupbasis and close > open ? lime : na)
barcolor(crossdownbasis and close < open ? red : na)
barcolor(confirmlbup ? yellow : na)
barcolor(confirmlbdown ? fuchsia : na)
barcolor(confirmubup ? yellow : na)
barcolor(confirmubdown ? fuchsia : na)
barcolor(confirmbasisup ? yellow : na)
barcolor(confirmbasisdown ? fuchsia : na)
barcolor(cnfmaggrlbup ? blue : na)
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out