Bollinger Bands BandWidth Indicator for TradeStation

The Bollinger Bands are already present on every platform, but using the Bollinger Bands Bandwidth Indicator, the bands will be displayed only when the volatility decreases (during periods of “congestion” or during a range-bound market).

I sometimes use this filter in mean-reverting strategies to avoid signals when volatility is low. This simple correction generally improves breakout strategies.

How to Create a Bollinger BandWidth Indicator

Firstly, we will use the Bollinger Bandwidth function which measures the BandWidth and thus the volatility of a given financial instrument.

We begin to draw the Bollinger Bands with simple code, slightly different from what you find on the platform:

Bollinger Bands Code1 TradeStation MultiCharts
Bollinger Bands TradeStation MultiCharts

After that, we have to code the slow and fast Bandwidth and its moving average:

Bollinger Bands Code3 TradeStation MultiCharts

The result will be the distance between the bands. However, we do not just need the distance, so we’ll have to compare a fast Bandwidth with a slower one. In this example, we use a 50-period moving average.

If volatility increases the Bandwidth stays above its moving average.

In addition, we insert the fast Bandwidth above the slow Bandwidth so you can have four types of volatility already usable:

Bollinger Bands Code4 TradeStation MultiCharts

The indicator will draw congestions like this:

Bollinger Bands BandWidth TradeStation MultiCharts

How to “draw” Transparent Bollinger Bands

To display the Bollinger Bands BandWidth only during the phases of decreasing volatility, I used the Argb function.

With this function, we can define the colors in Easylanguage for only TradeStation and have much more flexibility than the few preset colors.

The code looks like this:


In short, replace the first and the last value with a 0 and the color becomes transparent.

Bollinger Bands Code5 TradeStation MultiCharts

Bollinger Bands BandWidth Indicator Download


[sociallocker id=”7256″]

Click to Download


More from Finance Strategy System


How To (AUTO) Trade Divergences

The Bollinger Bands Indicator Tutorial

The McClellan Summation Index || Technical Analysis


Bollinger Bands Standard Deviation

Momentum Indicator Oscillator || 2020 Tutorial

TradeStation Strategy – Bollinger Bands Reversal Price Exit Setup

Gold Trading Strategy with Stochastic Indicator

BOLLINGERBANDS.COM: What are Bollinger Bands?

Recent Posts