Thing is, the volatility needs to be measured / defined and determined to know it is high volatility and by then with Auto-trading it’s often too late! 🙁
Try using narrow Bollinger for low volatility and wide Boll Bands to avoid high volatility.
Another way to measure it is by using the Standard Deviation.
There are many volatility indicators in the library that may help you detect its value (bear in mind, as GraHal said, that it may be a bit late, as with any indicator).