PROTECTED SOURCE SCRIPT

Bollinger Bands TBB

//version=6
indicator(shorttitle="BB TBB", title="Bollinger Bands TBB", overlay=true, timeframe="", timeframe_gaps=true)
length = input.int(20, minval=1)
maType = input.string("SMA", "Basis MA Type", options = ["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"])
src = input(close, title="Source")
mult = input.float(2.0, minval=0.001, maxval=50, title="StdDev")

ma(source, length, _type) =>
switch _type
"SMA" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)

basis = ma(src, length, maType)
dev = mult * ta.stdev(src, length)
upper = basis + dev
lower = basis - dev
offset = input.int(0, "Offset", minval = -500, maxval = 500, display = display.data_window)
plot(basis, "Mid", color=color.rgb(0, 0, 0), linewidth = 2, offset = offset)
p1 = plot(upper, "Upper", color=color.rgb(254, 254, 254), offset = offset)
p2 = plot(lower, "Lower", color=#ffffff, offset = offset)
fill(p1, p2, title = "Background", color=color.rgb(33, 150, 243, 95))

sma10 = plot(ta.sma(close, 10), color = #037f28, linewidth = 1, title = 'SMA10')
sma34 = plot(ta.sma(close, 34), color = color.rgb(30, 0, 255), linewidth = 2, title = 'SMA34')
sma200 = plot(ta.sma(close, 200), color = color.rgb(255, 69, 141, 100), linewidth = 2, title = 'SMA200')
ema100 = plot(ta.ema(close, 100), color = color.rgb(255, 255, 255, 100), linewidth = 1, title = 'EMA100')
ema200 = plot(ta.ema(close, 200), color = color.rgb(248, 3, 97), linewidth = 1, title = 'EMA200')

fill(ema100, ema200, title = "Major", color=color.rgb(255, 255, 255, 70))

Bands and Channels

Script protégé

Ce script est publié en code source fermé et vous pouvez l'utiliser librement. Vous pouvez le préférer pour l'utiliser sur un graphique. Vous ne pouvez pas visualiser ou modifier son code source.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité