Bearish Bollinger Squeeze

The Bollinger band plots a moving average together with an upper and lower band. The width of the band is a measure of the price volatility at that point. A Bollinger squeeze is where the price volatility becomes temporarily suppressed over a short time. Squeezes often end with a strong breakout either to the upside or downside. The chart below shows a typical squeeze event.

Card image cap

Bearish Bollinger squeeze

This indicator detects bearish Bollinger squeezes. To begin, go the Indicator Builder. Next add a Subtract operator. Set the first input to Bollinger Band. Click the cogs icon to adjust the settings for the Bollinger band. Set the length to 50 bars, or as required then click save to store the settings.

Card image cap

Bollinger bandwidth

Now copy the first row into the second input of the Subtract operator. To do this, drag the Bollinger band row whilst holding down the CTRL key and drop it on the second input placeholder.

Set the selector in the first Bollinger band to Upper and the second to Lower as in the image above. The subtract will then give the band width.

Card image cap

Compare bandwidth to min

Click the top row, then click the plus icon in the toolbar to add a new row above it. Set that to a Less Than or Equal operator. Then set the second input to Min. Then copy the Subtract stub to the input of the Min operator. To do this, drag the row whilst holding CTRL, then drop it over the input row placeholder. The result should now look like the image above.

Card image cap

Adding relative volume

The logic so far tells us where the Bollinger bandwidth is the narrowest over the last 50 bars, which is the default length for the Min operator.

Since we only want the first bar where this event starts, add a Dirac Delta function, then a Threshold function as shown in the image below. The Less Than or Equal stub is collapsed here to make the structure easier to read.

Card image cap

Preview the first bar in squeeze

Click the preview icon (spyglass) in the Threshold row. It should look something like the image above.

Card image cap

Add second condition

For a bearish squeeze, we want to confirm that the price line is rising during the squeeze period. To do this, add an And operator in the top row. Set the second input to Greater Than and it’s input to Moving average of a Gradient as shown in the image above.

Next set the Moving Average length to 30 and the Gradient length to 7.

Card image cap

Finally, add a Sell operator in the top row. Then on clicking preview, confirm that the indicator does indeed detect the bearish Bollinger squeezes.

Use this Indicator

Risk Disclosure: Information given on this website is for general purposes only and should not be construed as investment advice. Certain instruments shown here are complex and may come with a high risk of losing money rapidly due to leverage. You should consider whether you understand how these instruments work and whether you can afford to take the high risk of losing your money. Market data displayed is indicative and is not a solicitation to buy or sell.