Squeeze Breakout
Squeeze Breakout is a strategy that trades NAS100 on 15-minute bars. It holds at most 1 open trade and waits 200 bars before trading.
trade management
strategy "Squeeze Breakout"market: NAS100bars: 15mmax_open: 1warmup: 200bb = bollinger(close, 20, multiplier: 2.0)kc = keltner(close, 20, multiplier: 1.5)squeeze_on = bb.upper < kc.upper and bb.lower > kc.lowerreleased = ends(squeeze_on)momentum_up = linreg_slope(close, 20) > 0when released and momentum_up and close > kc.upper:buy risk: 1%, stop: kc.middle, target: 2R:trail by: atr(14) * 2, after: 1Rwhen released and not momentum_up and close < kc.lower:sell risk: 1%, stop: kc.middle, target: 2R:trail by: atr(14) * 2, after: 1Rbackground orange.fade(90), when: squeeze_onSqueeze Breakout is a strategy that trades NAS100 on 15-minute bars. It holds at most 1 open trade and waits 200 bars before trading.
It calculates bb as the Bollinger Bands (source the close, length 20, multiplier 2.0), kc as the Keltner Channels (source the close, length 20, multiplier 1.5), squeeze_on as whether bb.upper is below kc.upper and bb.lower is above kc.lower, released as whether squeeze_on stops being true and momentum_up as whether the linreg slope (source the close, length 20) is above 0.
When released and momentum_up and the close is above kc.upper, it buys at market, risking 1% of the balance, with a stop at kc.middle and with a target 2R from the entry; once open, it trails the stop by 2 × the 14-bar ATR once the trade reaches 1R.
When released and not momentum_up and the close is below kc.lower, it sells at market, risking 1% of the balance, with a stop at kc.middle and with a target 2R from the entry; once open, it trails the stop by 2 × the 14-bar ATR once the trade reaches 1R.
On the chart, it shades the background when squeeze_on.