OPEN-SOURCE SCRIPT

Squeeze Momentum Pro

246
Squeeze Momentum Pro (SQZP) — Squeeze-Release Momentum Signals with a Full Trade-Management Shell

█ OVERVIEW

This indicator is built on LazyBear's Squeeze Momentum Indicator as its signal engine, rebuilt into a complete "signal → trade plan → performance tracking" tool. Instead of only displaying squeeze states, it turns each squeeze release into an actionable signal with a defined direction, stop-loss, and three take-profit levels — and it continuously tracks the historical performance of every signal, so you can verify for yourself whether this signal has merit on your instrument and timeframe.

█ SIGNAL LOGIC

Entry signal = squeeze-release bar + momentum direction confirmation:

• Squeeze: Bollinger Bands contract fully inside the Keltner Channel — volatility compression, energy building up.
• Release: the bar where the squeeze ends (sqzOn → off), confirmed on close.
• Direction: determined by the linreg momentum value — long when > 0, short when < 0.
• Optional quality conditions: Minimum Squeeze Bars (the squeeze must last N consecutive bars before release, filtering out shallow compressions) and Momentum Strengthening (the release bar's momentum must be stronger than the previous bar's, matching the "bright" histogram state of the original).

Changes and extensions relative to LazyBear's original:
1. The original only plots a momentum histogram and squeeze dots. This script turns the release bar into a tradable event, and adds the two quality conditions above.
2. Complete exit plan: SL anchored at entry price by ATR multiple; TP1/TP2/TP3 defined in R-multiples (multiples of the actual per-trade risk), with a one-third scale-out settlement model.
3. Trade card: the latest signal's entry, stop, and three targets displayed directly on the chart, with risk-amount conversion.
4. Performance panel: automatic tracking of win rate, profit factor, expectancy (in R), max drawdown, and an equity curve across all historical signals.
5. Edge diagnostics row: MFE/MAE and post-signal N-bar drift (with long/short breakdown and a non-overlapping sampling mode), for testing whether the entry itself carries directional information.
6. Optional filters (ADX / RSI / Volume, OFF by default) and a session filter, for running your own conditional hypothesis tests.

█ HOW TO USE

1. Add to chart. Orange dots along the bottom mark an active squeeze; a long/short marker appears on the release bar.
2. Check the trade card (top right) for the full price plan of the latest signal (entry / SL / TP1-3).
3. Open the stats panel and inspect the historical expectancy of this signal on your symbol and timeframe — if expectancy is negative or the sample is too small, do not trade it there.
4. Built-in Buy / Sell alert conditions are available for creating alerts.

The default parameters (BB 1.5×20, KC 2.0×20, min squeeze 3 bars, momentum strengthening ON, SL 3.0×ATR, TP at 2/3.5/6 R) reflect the author's offline testing preference on crypto 1H charts. Treat them as a starting point only and re-validate on your own market and timeframe. Note: a BB multiplier of 1.5 reproduces the actual behavior of LazyBear's original; the textbook 2.0 definition can be restored via the input.

█ IMPORTANT DISCLAIMERS

• The built-in performance statistics do NOT include commissions or slippage and are therefore systematically optimistic. They are intended for relative signal-quality comparison only and are not a promise of profitability.
• Historical statistics do not predict future results. Extended losing streaks can occur in any period — manage your own risk.
• This indicator is for educational and research purposes only and does not constitute investment advice.

Credits: the signal engine is derived from LazyBear's Squeeze Momentum Indicator — thanks for the open-source contribution.

- - - - - - - - - - - - - - - - - - - - - - - - - - - -

Squeeze Momentum Pro(SQZP)— 擠壓釋放動量訊號 + 完整交易管理外殼

█ 這是什麼

本指標以 LazyBear 的 Squeeze Momentum Indicator 為訊號引擎基礎,重建為一套完整的「訊號 → 進出場計畫 → 績效追蹤」工具。它不只畫出擠壓狀態,而是在每次擠壓釋放時給出明確的進場方向、停損價、三段停利價,並持續統計所有歷史訊號的表現,讓你能自行檢驗這個訊號在你的商品與週期上是否有效。

█ 訊號邏輯

進場訊號 = 擠壓釋放棒 + 動量方向確認:

• 擠壓(Squeeze):Bollinger Bands 完全收進 Keltner Channel 內,代表波動壓縮、能量累積。
• 釋放(Release):擠壓狀態解除的那根 K 棒(sqzOn → off),於收盤確認進場。
• 方向:以 linreg 動量值判定 — 動量 > 0 做多、< 0 做空。
• 可選強化條件:最少擠壓棒數(釋放前需連續擠壓 N 棒,過濾淺層壓縮)、動量需增強(釋放棒動量須比前一棒更強,對齊原版直方圖的「亮色」狀態)。

相對 LazyBear 原版的修改與擴充:
1. 原版只顯示動量直方圖與擠壓點,本指標將「釋放棒」事件化為可交易訊號,並加上最少擠壓棒數與動量增強兩個品質條件。
2. 完整出場計畫:SL 以 ATR 倍數錨定進場價,TP1/TP2/TP3 以 R 倍數(實際風險的倍數)設定,支援三等分分批出場模型。
3. 交易卡:圖上直接顯示最新訊號的進場價、停損價、三段停利價與風險金額換算。
4. 績效統計表:自動追蹤所有歷史訊號的勝率、獲利因子、期望值(R)、最大回撤與資金曲線。
5. Edge 診斷列:MFE/MAE、訊號後 N 棒漂移(含多空分解、非重疊取樣模式),用於檢驗訊號本身是否含方向資訊。
6. 可選濾網(ADX / RSI / 量能,預設關閉)與 Session 時段過濾,供使用者自行做條件化檢定。

█ 使用方式

1. 掛上圖表後,圖下緣橘點表示擠壓進行中;出現多/空標記即為釋放訊號。
2. 看右上角交易卡取得該筆訊號的完整價位計畫(進場/SL/TP1-3)。
3. 打開統計表,觀察此商品此週期的歷史訊號期望值——期望值為負或樣本太少,就不要用在這個市場。
4. 內建 Buy / Sell 警報條件,可直接建立 Alert。

預設參數(BB 1.5×20、KC 2.0×20、最少擠壓 3 棒、動量需增強、SL 3.0×ATR、TP 2/3.5/6 R)為作者在加密貨幣 1H 週期上離線檢驗後的偏好配置,僅供起點參考,不同商品與週期請自行重新檢驗。註:BB 乘數 1.5 對應 LazyBear 原版的實際行為;正統 2.0 定義亦可透過參數還原。

█ 重要聲明

• 指標內建的績效統計未計入手續費與滑價,數字系統性偏樂觀,僅供訊號品質的相對比較,不構成任何獲利承諾。
• 歷史統計不代表未來表現。任何時期都可能出現連續虧損的區間,請自行做風險管理。
• 本指標為教育與研究用途,不構成投資建議。

致謝:訊號引擎源自 LazyBear 的 Squeeze Momentum Indicator,感謝其開源貢獻。

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.