INDICATOR MANUAL
Volatility regime map indicatorVolatility Regime Range Map [AFD] · full manual · published to TradingView
Read which of four volatility regimes each stretch of the chart belonged to—drawn as boxes on price, ranked over a rolling calendar window, with optional higher-timeframe frames—without turning any of it into a forecast.
Start here
What the indicator does, the questions it can help answer, and its fresh-install defaults.
The indicator runs on the price chart. It measures each bar’s movement with one of four realized-volatility estimators—Parkinson high-low by default, or Close-to-close, Garman–Klass, or ATR—and ranks that reading as a percentile against a rolling calendar window. It requests no options, implied-volatility, or external-symbol data; the higher-timeframe frames re-run the same engine on the same chart symbol at a higher timeframe.
Each reading maps to a tier—QUIET below the 25th percentile, NORMAL to the 75th, ELEVATED to the 85th, EXTREME at or above it—through a one-point hysteresis band so the regime does not flip on a single borderline bar. An optional absolute-size route can also call EXTREME when the short window reaches an estimator-specific multiple of the long one, including before the window holds enough history to rank.
Every unbroken stretch of one regime becomes an episode: a box spanning the bars it covered and the price range it reached. The current episode’s box glows and extends while its regime holds; recent completed episodes stay as faint boxes behind it, and one or two higher timeframes can be outlined as nested frames. Everything is measured on confirmed bars and left in place—the tool describes what volatility has been, not what price will do next.
Fresh-install defaults8 documented defaults
Swipe or scroll horizontally to see every column.
| Area | Default | Result |
|---|---|---|
| Estimator and sensitivity | Parkinson · Fast (5 / 30) | Measures each bar with the high-low range and reads it over a 5-bar short and 30-bar long window. |
| Comparison lookback | 6 Months | Ranks each reading against a rolling six-month calendar window, so a regime means the same span of history on any timeframe. |
| Absolute EXTREME route | On · 1.35× for Parkinson | Adds a second path to EXTREME when the short window reaches a set multiple of the long one, including before the window can rank. |
| Session-gap handling | Exclude on | Drops the overnight gap on each session’s first bar for Close-to-close and ATR only; the range estimators are unaffected. |
| Episode boxes | Border width 2 · glow 3 · fill 88 · border 20 | The current episode draws a glowing box whose height is the price range that stretch covered. |
| Completed boxes | Show on · 12 kept | Recent finished episodes stay as faint boxes; older ones drop off. Dashboard percentiles still use the full history. |
| Higher-timeframe frames | On · 1M dashed · 1W dotted | Outlines each higher timeframe’s developing bar, colored by that timeframe’s confirmed regime; a timeframe not higher than the chart is skipped. |
| Dashboard | Off · Top right · Small | The numeric table is off by default; when shown it reports the current regime, the episode’s age and range, and their percentiles. |
How it works
How the indicator turns chart data into the states and drawings you see.
Four realized-volatility estimators
Parkinson (default) and Garman–Klass take the root mean of per-bar range variance terms; Close-to-close is the population standard deviation of log returns; ATR is a simple mean of true range over each bar’s close, not Wilder’s smoothing. The one you pick measures every regime, and it is the same engine as the Volatility Regime Classifier.
Two sensitivity windows
Fast reads 5 versus 30 bars, Normal 10 versus 60, Slow 20 versus 120. The short window is the reading that gets ranked into a tier; the long window is the baseline the absolute-size route compares it against.
A regime ranked over calendar time
The short-window reading is ranked as a percentile against a rolling calendar window—Days, Weeks, or Months, default six months, with a month counted as a 30-day span. Ranking needs at least 30 readings in the window; on very low timeframes only the most recent 5,000 readings are kept, so the same span means the same thing across timeframes.
Tiers, hysteresis, and a second EXTREME route
Raw tiers begin at the 25th, 75th, and 85th percentiles, and a one-point band resists a marginal boundary flip. The optional absolute-size route bypasses the percentile when the short/long ratio reaches an estimator multiple—1.35 Parkinson, 2.00 Close-to-close, 1.30 Garman–Klass, 1.40 ATR—and can classify EXTREME before the window can rank.
Episodes drawn as boxes
Each unbroken stretch of one regime is a box spanning the bars it covered and the high-to-low range it reached. A new box opens at the confirmed bar where the regime changes; the current box glows and extends, and completed boxes stay faint behind it up to the configured cap. Boxes are anchored in bar time, so a long episode’s anchor does not drift past the drawing limit.
Higher-timeframe frames
The same engine runs on one or two higher timeframes through request.security and is read from each timeframe’s most recently confirmed value, so a frame does not repaint. Each frame outlines that timeframe’s current bar from its period open to the latest bar—HTF 1 dashed, HTF 2 dotted—colored by regime or a custom color, labeled with the timeframe and its regime.
Confirmed bars only, no redraw
State advances once per confirmed bar. Once an episode box or a higher-timeframe frame is drawn, later bars do not move it or change its color, and a standing note—“describes chart history · not a forecast”—travels with the script in the Data Window.
Output and state reference9 documented states
Swipe or scroll horizontally to see every column.
| Output or state | When it appears | Meaning |
|---|---|---|
| QUIET / NORMAL / ELEVATED / EXTREME | Reported tier after the band or the size route | Which volatility tier the current stretch is in—a measure of size, never of direction. |
| Episode box | An unbroken regime stretch on confirmed bars | The bars the regime covered and the price range it reached; the current one glows and extends. |
| Completed box | A regime change closes the prior episode | A finished stretch kept as a faint box behind the current one, up to the configured cap. |
| HTF frame + label | Frames on and the timeframe is higher than the chart | That timeframe’s current developing bar, colored by its confirmed regime and labeled “timeframe · regime”. |
| EXTREME by size | Short/long ratio reaches the estimator multiple | The absolute-size route to EXTREME, which can act before the percentile is able to rank. |
| Dashboard rows | Show dashboard enabled | Current regime, the episode’s age and range, their percentiles, the history sample, and the estimator and lookback. |
| Age / Range percentile | At least 10 completed episodes on the chart | Where the current episode’s age and range rank among finished episodes; before that it reads “sample N/10”. |
| Warming up | Fewer than 30 readings in the window, or no usable regime | The dashboard shows warming up until a regime can be classified from the window. |
| Data Window note | Always on | The standing “Volatility-regime episodes · describes chart history · not a forecast” disclosure. |
Settings
The 29 inputs below match the published Pine surface across Regime engine, Regime colors, Episode boxes, Higher timeframes, and Dashboard. The tier thresholds (25 / 75 / 85), the one-point hysteresis band, the estimator-specific EXTREME multiples, the 30-reading minimum, and the 5,000-reading cap are fixed source constants—disclosed here and by the dashboard rather than exposed as inputs.
Regime engine6 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Volatility estimatorestimatorInput | Choice / text | Parkinson (high-low) | Parkinson (high-low) · Close-to-close · Garman-Klass (OHLC) · ATR (average true range) |
| SensitivitysensitivityInput | Choice / text | Fast (5 / 30) | Fast (5 / 30) · Normal (10 / 60) · Slow (20 / 120) |
| Comparison lookbacklookbackLengthInput | Whole number | 6 | Min 1 · Max 120 |
| Lookback unitlookbackUnitInput | Choice / text | Months | Days · Weeks · Months |
| Also call EXTREME by absolute sizeextremeBySizeInput | Toggle | On | — |
| Exclude the session gapexcludeSessionGapInput | Toggle | On | — |
Regime colors4 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| QUIETcolQuiet | Color | #2962FF | — |
| NORMALcolNormal | Color | #26A69A | — |
| ELEVATEDcolElevated | Color | #FF9800 | — |
| EXTREMEcolExtreme | Color | #F23645 | — |
Episode boxes7 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Box border widthprimaryWidthInput | Whole number | 2 | Min 1 · Max 6 |
| Glow layersglowLayersInput | Whole number | 3 | Min 0 · Max 6 |
| Border transparencyborderTranspInput | Whole number | 20 | Min 0 · Max 100 |
| Fill transparencyfillTranspInput | Whole number | 88 | Min 0 · Max 100 |
| Label the current boxshowLabelInput | Toggle | On | — |
| Show completed boxesshowPastInput | Toggle | On | — |
| Completed boxes keptpastCapInput | Whole number | 12 | Min 0 · Max 60 | Conditional |
Higher timeframes8 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Draw higher-timeframe framesenableMtfInput | Toggle | On | — |
| HTF 1htf1Input | Timeframe | 1M | Conditional |
| widthhtf1WidthInput | Whole number | 2 | Min 1 · Max 6 | Conditional |
| HTF 2htf2Input | Timeframe | 1W | Conditional |
| widthhtf2WidthInput | Whole number | 2 | Min 1 · Max 6 | Conditional |
| Color frames by regimehtfColorByRegimeInput | Toggle | On | Conditional |
| HTF 1 colorhtf1ColorInput | Color | #F23645 | Conditional |
| HTF 2 colorhtf2ColorInput | Color | #2962FF | Conditional |
Dashboard4 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Show dashboardshowDashboardInput | Toggle | Off | — |
| PositionhudPosInput | Choice / text | Top right | Top right · Top left · Bottom right · Bottom left | Conditional |
| SizehudSizeInput | Choice / text | Small | Tiny · Small · Normal | Conditional |
| Dashboard transparencytableTranspInput | Whole number | 10 | Min 0 · Max 100 | Conditional |
Alerts and limitations
What can notify you, what can change the output, and what the indicator cannot establish.
Alerts
Limits to keep visible
- Every box, frame, and percentile is a measurement of this chart’s own price history. A regime does not estimate direction, the next move, or how long the current stretch will last.
- A regime is ranked inside a rolling calendar window, so the same reading can sit in different tiers as the window fills or rolls forward. Changing symbol, timeframe, estimator, sensitivity, or lookback changes the population being ranked.
- The percentile needs at least 30 readings in the window before it ranks, and on very low timeframes only the most recent 5,000 readings are kept. The absolute-size route may call EXTREME before the window can rank and states that reason separately.
- Parkinson and Garman–Klass read inside each bar, so Exclude the session gap changes only Close-to-close and ATR. ATR mode is a simple mean of true range over price, not Wilder’s ATR, and should not be expected to match ta.atr().
- Age and range percentiles need at least ten completed episodes on the loaded history before they show a number; until then the dashboard reports the sample it has.
- Higher-timeframe frames read each timeframe’s most recently confirmed regime; the developing higher-timeframe bar is not final until it closes, and a timeframe not higher than the chart is skipped.
- The regime names are labels for measured tiers, not ratings, scores, or probabilities, and none of the drawings is an entry, exit, stop, or target.
Troubleshooting
Start with what you see on the chart. Each answer explains the likely cause and the first setting, timeframe, or data condition to check.
The boxes are drawing behind the candles—how do I bring them forward?
On the first add, the episode boxes can sit behind the candles. Remove the indicator and add it again once; TradingView then draws it in front. This is the intended one-time step, and the defaults are the intended reading once it is in front.
Why don’t I see a higher-timeframe frame?
A frame is drawn only when Draw higher-timeframe frames is on and that timeframe is strictly higher than the chart’s. A 1-week or 1-month frame shows on an intraday or daily chart, but a frame equal to or below the chart timeframe is skipped. Set HTF 2 equal to HTF 1 to show only one frame.
Why does the dashboard say warming up, or show “sample N/10”?
The regime needs at least 30 readings inside the comparison window before it can rank a percentile, and the age and range percentiles need at least ten completed episodes on the chart. Load more history or widen the lookback; the script will not rank a partial sample.
Why is the regime EXTREME when the reading doesn’t look that high?
The absolute-size route is on. When the short window reaches a set multiple of the long one—1.35× for Parkinson—the script can call EXTREME without a high percentile, including before the window can rank. Turn off Also call EXTREME by absolute size to tier by percentile only.
Why didn’t the regime flip exactly at the 25, 75, or 85 boundary?
A one-point hysteresis band sits around each threshold so a single borderline reading does not flip the regime back and forth. The raw tier can cross first while the drawn regime holds its prior state until the reading clears the band.
Why did Exclude the session gap change nothing?
It affects only Close-to-close and ATR, and only at intraday session boundaries. Parkinson (the default) and Garman–Klass read movement inside each bar, so the overnight gap is not part of those estimates. Switch estimators to see the setting take effect.
Do the boxes or frames repaint as new bars form?
No. Regimes update on confirmed bars only. A new episode box opens at the bar where the regime changes, and each higher-timeframe frame reads its timeframe’s most recently confirmed regime, so an already-drawn box or frame keeps its position and color as later bars form.