Code Library / Entry Signals
Bollinger Band Breakout
Highlights Bollinger Band breakout signals.
Language: Pine Script · Category: Entry Signals · Tags: Bollinger Bands, breakout, Pine Script
Source code
//@version=5
indicator("BB Breakout", overlay=true)
basis = ta.sma(close, 20)
dev = 2 * ta.stdev(close, 20)
plot(basis + dev, "Upper", color.red)
plot(basis, "Basis", color.gray)
plot(basis - dev, "Lower", color.green)How to use this snippet
This is a building block, not a finished trading system. Paste it into your own Pine Script project, compile it, and test it on a demo account with your broker's real spreads before relying on it. You can convert it to MQL4 or MQL5 with the Pine Script converter.