OPEN-SOURCE SCRIPT
20-Day Range % - TigerTraders

Title: 20-Day Range % — Volatility Regime Filter
Short Description:
Measures the percentage range (highest high minus lowest low) over the last 20 trading days relative to current price. Designed to identify volatility regimes for options sellers.
Full Description:
This indicator calculates a simple but powerful metric: how much has price moved over the last N days, expressed as a percentage of the current price?
Formula:
Range % = (Highest High - Lowest Low) / Close × 100 over a configurable lookback period (default: 20 days).
Why it matters for options sellers:
Through backtesting 2.5 years of TSLA options data (Aug 2023 – Mar 2026), I found that this single indicator splits the market into three distinct volatility regimes — each requiring a completely different options strategy:
- Above 30% (Red zone): The stock is making extreme moves. Premium is massive (7-13% of stock price). Selling single-leg options against the mean reversion signal produced a 100% win rate across 7 trades in backtesting. Volatility crush
does the heavy lifting.
- Below 18% (Quiet zone): The stock is range-bound and chopping. Ideal conditions for selling strangles (OTM call + OTM put). Short-dated (14-28 DTE), 10% OTM strangles with a 50% profit target hit an 82% win rate with a 2.40 profit
factor across 65 trades.
- 18-30% (No man's land): Too volatile for strangles, not extreme enough for directional premium selling. Backtesting showed this is the zone where most losing trades occurred. The indicator helps you stay out.
How to use it:
The indicator plots the range % as a line in a separate pane with two configurable threshold levels:
- Orange dashed line (default 25%): Alert threshold — volatility is elevated, start watching for setups
- Red dashed line (default 30%): High threshold — extreme volatility regime, single-leg premium selling setups are active
- Background shading highlights when price enters the orange or red zones
When the line is low and flat (below 18%), conditions favor short strangles. When it spikes into the red zone, conditions favor selling single-leg options in the direction of mean reversion.
Settings:
- Lookback Period (default: 20 days)
- Alert Threshold (default: 25%)
- High Threshold (default: 30%)
Notes:
- Backtested on TSLA only — the thresholds may need adjustment for lower-volatility tickers
- This is a regime filter, not a standalone signal — pair it with your own entry trigger (mean reversion, RSI, etc.)
- Works on daily timeframe; not designed for intraday use
---
Want me to tweak the tone, add/remove anything, or adjust it for a specific audience?
Short Description:
Measures the percentage range (highest high minus lowest low) over the last 20 trading days relative to current price. Designed to identify volatility regimes for options sellers.
Full Description:
This indicator calculates a simple but powerful metric: how much has price moved over the last N days, expressed as a percentage of the current price?
Formula:
Range % = (Highest High - Lowest Low) / Close × 100 over a configurable lookback period (default: 20 days).
Why it matters for options sellers:
Through backtesting 2.5 years of TSLA options data (Aug 2023 – Mar 2026), I found that this single indicator splits the market into three distinct volatility regimes — each requiring a completely different options strategy:
- Above 30% (Red zone): The stock is making extreme moves. Premium is massive (7-13% of stock price). Selling single-leg options against the mean reversion signal produced a 100% win rate across 7 trades in backtesting. Volatility crush
does the heavy lifting.
- Below 18% (Quiet zone): The stock is range-bound and chopping. Ideal conditions for selling strangles (OTM call + OTM put). Short-dated (14-28 DTE), 10% OTM strangles with a 50% profit target hit an 82% win rate with a 2.40 profit
factor across 65 trades.
- 18-30% (No man's land): Too volatile for strangles, not extreme enough for directional premium selling. Backtesting showed this is the zone where most losing trades occurred. The indicator helps you stay out.
How to use it:
The indicator plots the range % as a line in a separate pane with two configurable threshold levels:
- Orange dashed line (default 25%): Alert threshold — volatility is elevated, start watching for setups
- Red dashed line (default 30%): High threshold — extreme volatility regime, single-leg premium selling setups are active
- Background shading highlights when price enters the orange or red zones
When the line is low and flat (below 18%), conditions favor short strangles. When it spikes into the red zone, conditions favor selling single-leg options in the direction of mean reversion.
Settings:
- Lookback Period (default: 20 days)
- Alert Threshold (default: 25%)
- High Threshold (default: 30%)
Notes:
- Backtested on TSLA only — the thresholds may need adjustment for lower-volatility tickers
- This is a regime filter, not a standalone signal — pair it with your own entry trigger (mean reversion, RSI, etc.)
- Works on daily timeframe; not designed for intraday use
---
Want me to tweak the tone, add/remove anything, or adjust it for a specific audience?
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.