1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
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
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
HMD Bollinger Band Volatility calculates standard Bollinger Bands, measures the percentage difference in band width relative to a user-defined lookback period, and identifies maximum expansion and contraction extremes over a trailing window. Plotted directly on the price chart, it renders the middle SMA and outer bands alongside a dynamic background color gradient that visually indicates volatility shifts. Configurable settings include SMA length, standard deviation multiplier, lookback period, and color thresholds.
Bollinger Band width percentage change calculation
Dynamic expansion and contraction gradient coloring
Customizable SMA length and standard deviation multiplier
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Middle SMA Length
int
20
maPeriod
Standard Deviation
float
2.0
standardDev
Lookback Period
int
10
lookback
Expansion % Alert
float
60.0
expAlert
Contraction % Alert
float
-40.0
conAlert
Expansion Color
color
color.new(color.lime,75)
expColor
Contraction Color
color
color.new(color.red,75)
conColor
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 an ATR-based Chandelier Exit trailing stop on the price chart. It tracks a long stop under recent highs and a short stop above recent lows, then switches direction when price crosses the opposite stop. Buy and sell labels mark those flips.
This overlay indicator marks ICT liquidity void fills on the price chart and can show long and short signals. It places a Fibonacci level inside a displacement candle, defaulting to the midpoint, and draws lines in a chosen style. Optional filters limit the fi
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
This indicator calculates an ATR trailing stop line derived from the highest high minus an average true range multiple over a specified lookback period. It plots the trailing stop line directly on the price chart and colors price bars based on whether the clos
This indicator plots three exponential moving averages and ATR volatility envelopes on the price chart. It compares the fast and slow EMAs to shade a trend ribbon and marks confirmed upward and downward crossovers with triangle labels. Settings change the thre
This indicator calculates an outlier-filtered moving average based on statistical filtering concepts. It stores close prices in a rolling array over a user-defined length, calculates the mean and standard deviation, and excludes values falling within a specifi