Squeeze Momentum Indicator (LazyBear) Guide

Master this indicator with Pine Script code and automated strategies.

What is Squeeze Momentum Indicator (LazyBear)?

The Squeeze Momentum Indicator is a derivative of John Carter's "TTM Squeeze" volatility indicator. It identifies periods of low volatility (squeeze) followed by explosive moves. When Bollinger Bands move inside the Keltner Channels, the market is "in a squeeze" - coiling like a spring before a big move.

How to Use This Strategy

Pro Tip: Look for black dots (squeeze is on) followed by gray dots (squeeze released). When the squeeze fires and momentum histogram is green, it signals bullish momentum. Red histogram after squeeze release signals bearish momentum.

Pine Script Code

Copy and paste this code into your TradingView Pine Editor.

PINE SCRIPT V5
//@version=5
indicator("Squeeze Momentum [LazyBear]", shorttitle="SQZMOM_LB", overlay=false)

// Inputs
length = input.int(20, "BB Length")
mult = input.float(2.0, "BB MultFactor")
lengthKC = input.int(20, "KC Length")
multKC = input.float(1.5, "KC MultFactor")

// Calculate Bollinger Bands
basis = ta.sma(close, length)
dev = multKC * ta.stdev(close, length)
upperBB = basis + mult * ta.stdev(close, length)
lowerBB = basis - mult * ta.stdev(close, length)

// Calculate Keltner Channels
ma = ta.sma(close, lengthKC)
range_1 = ta.sma(ta.tr, lengthKC)
upperKC = ma + range_1 * multKC
lowerKC = ma - range_1 * multKC

// Squeeze conditions
sqzOn = lowerBB > lowerKC and upperBB < upperKC
sqzOff = lowerBB < lowerKC and upperBB > upperKC
noSqz = sqzOn == false and sqzOff == false

// Momentum
val = ta.linreg(close - math.avg(math.avg(ta.highest(high, lengthKC), ta.lowest(low, lengthKC)), ta.sma(close, lengthKC)), lengthKC, 0)

// Colors
bcolor = val > 0 ? (val > nz(val[1]) ? color.lime : color.green) : (val < nz(val[1]) ? color.red : color.maroon)
scolor = noSqz ? color.blue : sqzOn ? color.black : color.gray

// Plots
plot(val, color=bcolor, style=plot.style_histogram, linewidth=4)
plot(0, color=scolor, style=plot.style_circles, linewidth=3)