Made this to signal when the criteria is met for a "Bollinger Band + Keltner Channel Squeeze" signal. This is when one or both of the Bollinger Bands come inside the Keltner Channel. When this happens the bars are highlighted. The idea of this script is to clean up charts as much as possible.
Bollinger Bands are measures of standard deviation from a simple moving average. This is the distance that price travels as a whole over time. Keltner Channels are a measure of ATR from an exponential moving average. This is the average range of individual bars.
Both indicators measure volatility and when they contract indicate that price is consolidation. A very tight consolidation can often be a prelude to an expansion of volatility and price movement. It can be a signal for a potential breakout or confirmation one will be successful.
The actual Bollinger Bands and Keltner Channels are turned off by default but can be turned on in the script settings. I also use 26 as the default length but it can be changed.