TTM Squeeze engine self-test 2026-10-14T13:30:35.861Z [PASS] linear regression value at the last point: a straight line returns itself [PASS] Bollinger and Keltner by hand on the flat stretch: SMA 100, standard deviation 0, ATR 2, squeeze on [PASS] no indicator before 20 bars, no momentum before bar 38 [PASS] the squeeze fires on the rise: on at the bar before, off at the firing bar, momentum above zero: bar 65, momentum 2.4274999999999967 [PASS] the long is entered at the open of the minute after the firing bar: 1 2024-01-04 19:00 momentum fades [PASS] exit A: out at the next open after the second bar of falling momentum: 2024-01-05 07:00 vs bar 77 [PASS] exit B: out only when momentum closes below zero, later than exit A [PASS] result in R after $0.30 of cost; R = 1.5 x ATR(14) at the signal bar; worst open result recorded [PASS] long-only takes the same long [PASS] mirror image: a short with the mirror result; long-only does not take it [PASS] exit rules by hand: A on two falling bars or below zero, B only below zero [PASS] synthetic SQ-LS-A: engine and re-implementation agree trade by trade: 115 vs 115, 0 differences [PASS] synthetic SQ-L-A: engine and re-implementation agree trade by trade: 59 vs 59, 0 differences [PASS] synthetic SQ-LS-B: engine and re-implementation agree trade by trade: 75 vs 75, 0 differences [PASS] synthetic SQ-L-B: engine and re-implementation agree trade by trade: 43 vs 43, 0 differences real data: 7067434 minutes, 129857 one-hour bars, 2004-06-11 00:19 .. 2026-10-07 16:57 New York [PASS] real data: Bollinger, Keltner, squeeze and momentum equal a naive recomputation (every 173rd bar): 0 differences [PASS] SQ-LS-A: engine and independent re-implementation agree trade by trade: 4054 vs 4054 trades, 0 differences [PASS] SQ-LS-A: control at offset 0 reproduces the real trades: 4054 of 4054, 0 differences [PASS] SQ-L-A: engine and independent re-implementation agree trade by trade: 2071 vs 2071 trades, 0 differences [PASS] SQ-L-A: control at offset 0 reproduces the real trades: 2071 of 2071, 0 differences [PASS] SQ-LS-B: engine and independent re-implementation agree trade by trade: 3146 vs 3146 trades, 0 differences [PASS] SQ-LS-B: control at offset 0 reproduces the real trades: 3146 of 3146, 0 differences [PASS] SQ-L-B: engine and independent re-implementation agree trade by trade: 1670 vs 1670 trades, 0 differences [PASS] SQ-L-B: control at offset 0 reproduces the real trades: 1670 of 1670, 0 differences PASSED