1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
96 lines of Pine Script v5 from scripts/132-Bollinger-Bands-Signals.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Bollinger Bands Signals plots the upper band, lower band, and basis line directly on the price chart, with a filled background between the outer bands. Buy and sell shape signals are generated using price crosses relative to the bands and basis line, filtered by a minimum band width threshold to reduce noise during consolidation.
Choice of EMA, SMA, WMA, or VIDYA base moving average
Band width threshold filter for signal generation
On-chart plots for basis, upper band, and lower band
Buy and sell plotshape labels on signal direction changes
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Dataset
source
close
Data
Base Moving Average
string
Vidya
Ma
Period [1..n]
int
42
Period
Deviation [0.01..50]
float
2.0
Mult
Bands Width [0.0001..0.1]
float
0.019
Width
Offset [-500..+500]
int
0
Offset
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator plots trade entry and exit signals on the price chart by combining Bollinger Bands with optional filter conditions. It calculates standard Bollinger Bands along with RSI, Aroon, and moving average filters. Reversal signals trigger when price bre
Acceleration Bands is an overlay indicator that plots a volatility envelope around a central simple moving average. It calculates upper and lower boundary bands scaled by the high-to-low bar range relative to the midpoint price, smoothed by an SMA over a user-
Calculates mean reversion signals using statistical deviation metrics such as MAD, Standard Deviation, ATR, Z-Score, IQR, or Mean AD relative to customizable moving averages. It applies optional volume spike thresholds and trend filters to generate bullish and
Kalman Percentile Bands plots a volatility-adaptive Kalman mean along with three empirical percentile bands on each side of the price chart. It calculates a local-level Kalman filter as the fair value mean, normalizes price deviations by an EWMA of volatility,
This indicator detects compressed corrective coils inside a higher-timeframe trend and signals when they resolve into clean directional breaks. It plots compression bands, fractal boxes, efficiency scores, and a light dashboard on the price chart. Signals clas
This indicator classifies price action into four distinct market regimes: Trend, Expansion, Compression, or Mean Reversion. It determines states using a simplified Hurst exponent estimate, ADX slope thresholds, and realized volatility measurements. Based on th