In fact, I wrote this script for detect Bollinger and Linear Regression Bands squeeze. It's a side script.
Logic works like this: Only the stagnant market probability is drawn from the Bollinger bandwidth by Dependent Variable Odd Generator and MFI index is calculated taking into account the volume. This value ranges from 0 to 100. To be sure, this value is averaged over a small period. If you break the average and exceed 50, the bollinger band is too narrow and the risk is too high. This means more commissions, more transactions, and vain work. Or, when in position, the warning is not ignored due to unnecessary signals.
This code is open source under the MIT license. If you have any improvements or corrections to suggest, please send me a pull request via the github repository github.com/user-Noldo