ucsgears

Bollinger Bands %B Bollinger Bands - Version 2

5980 7 1791
Thanks to Chris Moody for his touch

List of All my Indicators - https://www.tradingview.com/p/stocks/?sort=recent&time=day&by=ucsgears
Remove from Favorite Scripts Add to Favorite Scripts
//Updated by ChrisMoody on 8/14/2014 --  Original Code From ucsgears
study(title = "Bollinger Bands %B Bollinger Bands", shorttitle = "BB %B BB")
source = close
length = input(20, minval=1), mult = input(2.0, minval=0.001, maxval=50)
basis = sma(source, length)
dev = mult * stdev(source, length)
upper = basis + dev
lower = basis - dev
bbr = (source - lower)/(upper - lower)
//plot(bbr, color=teal)
 
basisa = sma(bbr, length)
deva = mult * stdev(bbr, length)
uppera = basisa + deva
lowera = basisa - deva
 
//Added This
aboveUp = bbr > uppera ? 1 : 0
belowDn = bbr < lowera ? 1 : 0
plotchar(aboveUp, title="i", char='S', location=location.top, color=red, transp=0, offset=0)
plotchar(belowDn, title="i", char='B', location=location.bottom, color=green, transp=0, offset=0)
 
//Added in BackGround Hilighting
noTrade = aboveUp == 0 and belowDn == 0
bgcolor(noTrade ? gray : na, transp=50)
bgcolor(aboveUp ? red : na, transp=60)
bgcolor(belowDn ? green : na, transp=60)
 
//Added This
col = bbr < lowera ? lime : bbr > uppera ? red : teal
 
//Changed your plot fills from Midline to top of band...and midline to lower band.
p1 = plot(basisa, color=silver, linewidth=0)
p2 = plot(uppera, color=red, linewidth=2)
p3 = plot(lowera, color=green, linewidth=2)
fill(p1, p2, color=red, transp = 70)
fill(p1, p3, color=green, transp = 70)
plot(bbr, color= col, style=linebr, linewidth=3)
А есть такой же индикатор в МТ4 ?
Reply
Thanks!
Reply
Like it! Thanks!
Reply
When trading Bitcoin you have to completely change everything. From red colored "sell" to show up as green "buy" and from green colored "buy" to signal in red to "sell" and only then it makes sense again... :)

snapshot
+1 Reply
This Works good in a market which can run and retrace. Before choosing an indicator, one needs to learn the market's nature. Taking an indicator for certain market nature and applying it in an opposite market will never work.
The intended reply is, this is not a holy grail. Infact, no indicator in the market is holy grail.
GL
+1 Reply
doman4real ucsgears
@ucsgears, quit agree with you. This will work in a trending and volatile markets. Never good for ranges
Reply
Trade this with the Volatility sqz indicator.
Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
ประเทศไทย
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out