TTM Squeeze
Whether the Bollinger Bands sit inside the Keltner Channel (a squeeze), plus momentum.
TTM squeeze, all windows period candles with the current included. Bollinger = SMA(x) ± bb_mult × σ (population); Keltner = SMA(x) ± kc_mult × SMA(true range). squeeze_on is true while the Bollinger bands lie inside the Keltner channel (lower BB > lower KC and upper BB < upper KC), else false. momentum = the linear-regression value at the current candle of x − ((highest high + lowest low) ÷ 2 + SMA(x)) ÷ 2. Ready at 2 × period − 1 candles.
Settings
| Setting | Default | Range | What it does |
|---|---|---|---|
| period | 20 | 2 to 500 | Candles in every window. |
| bb_mult | 2 | 0.1 to 10 | Bollinger distance in standard deviations. |
| kc_mult | 1.5 | 0.1 to 10 | Keltner distance in average true ranges. |
What it gives
| Output | What it is |
|---|---|
| Squeeze on | True while the squeeze is on. |
| Momentum | Squeeze momentum, in price (+ up, − down). |
What it reads
It reads open, high, low, close, hl2, hlc3, ohlc4, hlcc4, close by default.
Warm-up
With its default settings, TTM Squeeze needs 41 closed candles before its first value. A backtest loads them before its start date, so the first trade can already use it.
Related indicators
Built from: Bollinger Bands, Keltner Channels
Test it
Copy this sentence into the Algonney chat to backtest it:
Backtest a strategy on BTC that uses TTM Squeeze with its default settings