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?
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.