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)
English
English (UK)
English (IN)
Deutsch
Français
Español
Italiano
Polski
Türkçe
Русский
Português
Bahasa Indonesia
Bahasa Melayu
ภาษาไทย
Tiếng Việt
日本語
한국어
简体
台灣
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