OPEN-SOURCE SCRIPT
Coil Breaker | RSI Range Compression

Most RSI strategies fire off static 30/70 thresholds. Coil Breaker does something different: it treats RSI itself as a volatility asset and watches for its own trading range to contract to a multi-month low — a "coil" — before trading the breakout when it releases.
How it works:
Important — read before trading:
This is a breakout/momentum system, not a mean-reversion one, and it behaves accordingly: expect a low win rate (often 30–40%) alongside a high average win/loss ratio. Most coil breakouts fail or chop — you're paying for early entry with more false signals. The edge comes from asymmetric payoff (2R+ winners vs. 1R losers), not from being right often. Judge this strategy on profit factor and expectancy, not win rate. If a 60%+ win rate is what you're looking for, this isn't that system.
Tips:
How it works:
- Measures RSI's high-minus-low range over the last N bars and ranks it against its own history using a percentile score
- When that range compresses into the bottom percentile (default 20%), RSI is flagged as "coiled" — oscillating tightly around 50, momentum dormant
- A dynamic Bollinger-style channel is plotted directly around RSI so you can visually watch the coil tighten before it fires
- Once a squeeze has been active recently, a breakout above/below the established coil band (not the still-forming one) triggers an entry
- Direction is set by an EMA slope filter — the coil tells you something's coming, the EMA tells you which way
- Optional ADX filter keeps you out of truly dead, directionless chop
- ATR-based stop, fixed R-multiple target, and equity-percent risk sizing so every trade risks a constant dollar amount
Important — read before trading:
This is a breakout/momentum system, not a mean-reversion one, and it behaves accordingly: expect a low win rate (often 30–40%) alongside a high average win/loss ratio. Most coil breakouts fail or chop — you're paying for early entry with more false signals. The edge comes from asymmetric payoff (2R+ winners vs. 1R losers), not from being right often. Judge this strategy on profit factor and expectancy, not win rate. If a 60%+ win rate is what you're looking for, this isn't that system.
Tips:
- Backtest coilLen, pctLen, and the percentile threshold across your specific instrument/timeframe — coil dynamics vary a lot between assets
- Watch the equity curve shape, not just the total return — make sure gains aren't carried by one or two outlier trades
- Works best on instruments/timeframes with genuine volatility cycles (expansion/contraction), not ultra-choppy or illiquid markets
- Pair with higher-timeframe context if you want to filter out counter-trend coil breaks
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.