Bollinger Bands consist of a simple moving average (SMA) and two standard deviation lines. They expand and contract based on market volatility. This script plots the basis, upper, and lower bands.
//@version=6
indicator('Bollinger Bands', overlay=true)
len = input.int(20, 'Length')
mult = input.float(2.0, 'StdDev')
[mid, upper, lower] = ta.bb(close, len, mult)
plot(mid, 'Basis', color=color.orange)
p1 = plot(upper, 'Upper', color=color.blue)
p2 = plot(lower, 'Lower', color=color.blue)
fill(p1, p2, color=color.new(color.blue, 90))Enhance your trading workflow with these professional tools and platforms.
Keep 100% of the first $12.5K. EOD Drawdown and flexible evaluation types to suit your style.
Secure, reliable, and fully licensed. The best crypto experience for US traders.
The professional's choice for futures trading with minimal slippage and stable API.
Mirror the positions of top-tier traders instantly without writing code.