Appearance

Personalize your experience

Mode
Accent Color
Direction
MarketplacestrategiesSqueeze Breakout
QuaScript

Squeeze Breakout

Free

Trades the expansion after a volatility squeeze

0.0(0)
0 installs 0 0 comments
Q
159 listings

The QuaTick team's QuaScript analyses, run by the native C++ engine.

View Profile
quascriptstrategysqueeze
Free
Backtest this strategy Open in QuaTick IDE Edit in IDE
Version
Updated
Compatible

Live engine preview

QuaScriptQuaScript

The QuaScript engine's own output on the chart the terminal uses. Change the settings or edit the code and press Run to recompute it.

Squeeze Breakoutengine result
Loading the engine result…
quatick-charts · QuaScript engine on synthetic 1-minute bars · drag to pan · scroll to zoom · Run executes the script on the engine (⌘/Ctrl+Enter while editing)

About

Enters when a Bollinger-inside-Keltner squeeze releases in the direction of momentum; exits on a Chandelier stop or after `max_bars` bars.


Settings

Length: 20

Max bars in trade: 40


Measured backtests

Run by the backtest engine on public candles, 2025-11-01 to 2026-11-01, with the script's own commission and slippage, on BTCUSDT 1h (Binance) and ETHUSDT 1h (Binance). The figures per market are in the Measured backtest panel below. Past results do not predict future returns.


Backtest it yourself

Open it on the backtesting page to run it on any symbol, interval and date range, then use Monte Carlo, optimisation, walk-forward and robustness tests.

Strategy Rules

Entry Conditions

    Exit Conditions

      Measured backtest

      BTCUSDT 1h (Binance), 2025-11-01 to 2026-11-01 · backtest engine, script costs included

      Backtest this strategy

      18.0%

      Return

      0.84

      Sharpe

      -14.4%

      Max DD

      39.7%

      Win Rate

      146

      Trades

      MarketTradesReturnSharpeMax DDWin rateProfit factor
      BTCUSDT 1h14618.0%0.84-14.4%39.7%1.19
      ETHUSDT 1h15052.9%1.43-17.0%40.0%1.42

      Past results on historical data do not predict future returns.

      Source Code

      Edit in IDE
      quascript
      1strategy "Squeeze Breakout" {
      2 overlay = true
      3 capital = 25000
      4 commission = 0.02
      5 sizing = percent_equity
      6 size = 95
      7}
      8/// Enters when a Bollinger-inside-Keltner squeeze releases in the direction of momentum;
      9/// exits on a Chandelier stop or after `max_bars` bars.
      10len = param.int(20, title = "Length", min = 5)
      11max_bars = param.int(40, title = "Max bars in trade", min = 1)
      12 
      13(_, bb_up, bb_lo) = ta.bollinger(close, len, 2.0)
      14(_, kc_up, kc_lo) = ta.keltner(close, len, 1.5, len)
      15on = bb_up < kc_up and bb_lo > kc_lo
      16released = on[1] and not on
      17(mom, _, _) = stat.linreg(close - ta.sma(close, len), len, 0)
      18(long_stop, short_stop) = ta.chandelier(22, 3.0)
      19 
      20if position.size == 0 and released {
      21 if mom > 0 { order.market("L", side.long) }
      22 if mom < 0 { order.market("S", side.short) }
      23}
      24if position.size > 0 and (close < long_stop or position.bars_held >= max_bars) { exit.close("L") }
      25if position.size < 0 and (close > short_stop or position.bars_held >= max_bars) { exit.close("S") }
      26render.step(position.size > 0 ? long_stop : na, "Long stop", color = color.emerald.500)
      27render.step(position.size < 0 ? short_stop : na, "Short stop", color = color.rose.500)
      28render.background(on ? color.translucent(color.amber.500, 90) : na)
      29render.mark(released and mom > 0, shape = shape.arrow_up, at = anchor.below_bar, color = color.lime.400, text = "Release")
      30render.mark(released and mom < 0, shape = shape.arrow_down, at = anchor.above_bar, color = color.red.400, text = "Release")
      31 
      Read-only preview. Open in the QuaTick IDE to edit and deploy.

      Reviews

      No reviews yet. Be the first to review this listing.

      Discussion

      Sign in to join the discussion. Your posts and replies show up on your profile.