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)
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
HE עברית
Home Stock Screener Forex Screener Crypto Screener 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