This screener returns John Carters squeeze indicator that have left a “squeezed state”.
The indicator goes from red to green, meaning that it Bollinger bands are going from inside the Keltner channel to outside.
This indicates more volatility could be expected going forward.
// Indata
DUpperKC = exponentialaverage [20](close) + 1.5*averagetruerange[20](close)
DLowerKC = exponentialaverage [20](close) - 1.5*averagetruerange[20](close)
BolUp = BollingerUp[20](close)
BolDown = bollingerdown[20](close)
// Check bollinger bands inside Keltner chanel
c1 = bolup[1] < DUpperKC[1]
c2 = boldown[1] > DLowerKC[1]
// Check bollinger band outside Keltner chanel
c3 = bolup > DUpperKC
c4 = boldown < DLowerKC
fired = c3 or c4
//Check if trend is weak
adx14 = adx[14] < 20
// Return squeeze fired and weak trend
screener[c1 and c2 and fired and adx14]