Andrei Serdiuk

Triple Bollinger Bands

Bollinger Bands with three standard deviations
Remove from Favorite Scripts Add to Favorite Scripts
study(title = "Triple Bollinger Bands", shorttitle="Triple BB", overlay=true)
source = close
length = input(20, minval=20, maxval=50)
stdDev1 = input(1.0, minval=1.0, maxval=1.3)
stdDev2 = input(2.0, minval=2.0, maxval=2.3)
stdDev3 = input(3.0, minval=3.0, maxval=3.3)

basis = sma(source, length)
dev1 = stdDev1 * stdev(source, length)
dev2 = stdDev2 * stdev(source, length)
dev3 = stdDev3 * stdev(source, length)

upper1 = basis + dev1
lower1 = basis - dev1
upper2 = basis + dev2
lower2 = basis - dev2
upper3 = basis + dev3
lower3 = basis - dev3

plot(basis, color=yellow)
p1 = plot(upper1, color=blue)
p2 = plot(lower1, color=blue)
p3 = plot(upper2, color=aqua)
p4 = plot(lower2, color=aqua)
p5 = plot(upper3, color=red)
p6 = plot(lower3, color=red)
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