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
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.