INDICATOR MANUAL
Average daily range (ADR) indicatorRange Budget [AFD] · full manual · published to TradingView
Measure how much of an input-defined typical session range the live session has used without presenting it as an options-derived expected move.
Start here
What the indicator does, the questions it can help answer, and its fresh-install defaults.
The script builds its reference from completed sessions only. Typical range can mean average daily range, an RMA of session true range, or the median completed-session range; the live session and historical sample follow the same selected session rule.
Range budget is the live basis range divided by the selected typical range. The percentage is never capped at 100%. In ATR mode, both sides use true-range geometry, including a gap from the prior session close when one exists.
A compact dashboard names the active statistic, loaded sample, spread, and current state. The optional envelope and nearest-rank percentile ladder add conditional chart references; neither is a forecast, target, or instruction.
Fresh-install defaults8 documented defaults
Swipe or scroll horizontally to see every column.
| Area | Default | Result |
|---|---|---|
| Typical range statistic | Average daily range (ADR) | Averages the plain high-low range of completed sessions. |
| Lookback sessions | 20 | Keeps up to 20 completed ranges for ADR, median, and percentiles; sets the ATR RMA period to 20 while all seeded sessions retain decaying weight. |
| Session | Regular hours only | Excludes extended-hours bars from both the historical sample and live accumulator. |
| Envelope | On | Draws the conditional typical-range rails and their gradient band. |
| Percentile ladder | Off | Keeps the p25, p50, p75, and p90 completed-range references hidden. |
| Dashboard | On · Compact · Small | Shows the headline, budget meter, distance to typical, and required disclosure row. |
| Detail rows | Off | Keeps the expanded numeric rows hidden while Data Window values remain available. |
| Line and band style | Solid · Signal fade | Uses solid level lines and a state-aware envelope gradient. |
How it works
How the indicator turns chart data into the states and drawings you see.
One session rule on both sides
Regular hours only or Regular + extended hours controls which bars enter the live accumulator and what starts a new session. Completed history uses the same rule so the ratio does not mix unlike sessions.
Three typical-range statistics
ADR averages the retained completed plain ranges. Median selects their nearest-rank midpoint. ATR applies an RMA to completed true ranges, seeded from the first true range rather than delegating to ta.atr(); every seeded session remains in that RMA with decaying weight.
Matched live basis
ADR and Median compare the live high-low range with plain-range history. ATR compares live true range with true-range history, including the prior close when a session gap extends the basis.
Uncapped budget states
ROOM is below 50%, PAST HALF begins at 50%, NEAR FULL begins at 80%, and OVER TYPICAL begins at 100%. The meter fills at 100%, but the numeric percentage continues above it.
Conditional envelope
The upper rail is the live session low plus typical range; the lower rail is the live session high minus typical range. Each states where the opposite extreme would be if the current extreme held and the finished range equalled typical—it does not predict either outcome.
Nearest-rank ladder
Optional p25, p50, p75, and p90 lines place completed-session range values above the live low. Every rung is an observed range from the loaded sample, not a fraction of the current session’s range.
Disclosure and Data Window
The dashboard reports statistic, session mode, actual n, sample spread, and relevant notes. Eleven named Data Window plots keep the main calculations available even when the dashboard or chart drawings are hidden.
Output and state reference8 documented states
Swipe or scroll horizontally to see every column.
| Output or state | When it appears | Meaning |
|---|---|---|
| RANGE BUDGET % | Usable live basis and typical range | Uncapped live basis range divided by the selected typical range. |
| ROOM | Range budget below 50% | Less than half of the selected typical range has been realized. |
| PAST HALF | Range budget from 50% to below 80% | The live range has passed half of the selected typical range. |
| NEAR FULL | Range budget from 80% to below 100% | The live range is near the selected typical range. |
| OVER TYPICAL | Range budget at or above 100% | The live range has met or exceeded the selected typical range; no reversal or exhaustion is implied. |
| ENVELOPE | Envelope on with usable statistic | Conditional upper and lower typical-range identities around the live session. |
| PERCENTILE LADDER | Ladder on with completed sample | Observed p25, p50, p75, and p90 completed-session ranges measured from the live low. |
| NO DATA | No usable completed sample or basis | The script cannot form the selected comparison from available chart history. |
Settings
The 16 rows below match the published Pine input surface: three Statistic controls followed by thirteen Display controls. Conditional color and dashboard controls become applicable only when their parent mode is active.
Statistic3 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Typical range statisticstatisticInput | Choice / text | Average daily range (ADR) | Average daily range (ADR) · Average true range (ATR) · Median daily range |
| Lookback sessionslookbackInput | Whole number | 20 | Min 1 · Max 500 |
| SessionsessionInput | Choice / text | Regular hours only | Regular hours only · Regular + extended hours |
Display13 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Show envelopeshowEnvelopeInput | Toggle | On | — |
| Show percentile laddershowLadderInput | Toggle | Off | — |
| Show dashboardshowHudInput | Toggle | On | — |
| Show detail rowsshowDetailInput | Toggle | Off | Conditional |
| Envelope colourenvelopeColorInput | Color | #26C6DA | — |
| Ladder colourladderColorInput | Color | #7E57C2 | — |
| Line stylelineStyleInput | Choice / text | Solid | Solid · Dashed · Dotted |
| Band gradientgradientPresetInput | Choice / text | Signal fade | Signal fade · Ocean · Ember · Mono ink · Flat · Custom |
| Custom gradient — near railgradientNearInput | Color | #00E5FF | Conditional |
| Custom gradient — far railgradientFarInput | Color | #26C6DA | Conditional |
| Level label textlabelTextColorInput | Color | #ECEFF1 | — |
| Readout modehudModeInput | Choice / text | Compact | Expanded · Compact | Conditional |
| Readout text sizehudSizeInput | Choice / text | Small | Tiny · Small · Normal · Large | Conditional |
Alerts and limitations
What can notify you, what can change the output, and what the indicator cannot establish.
Alerts
Limits to keep visible
- Range Budget measures realized movement against recent completed sessions. It is not an options-derived expected move, probability estimate, volatility forecast, or signal.
- The current session is incomplete. Its percentage, state, envelope, percentile standing, and extremes can all change as new bars arrive.
- Regular-hours boundaries depend on the exchange, symbol, and chart session model. A chosen session convention may not match another trader’s definition of the day.
- On daily and higher chart intervals, each chart bar effectively supplies a session; intraday regular-versus-extended filtering is no longer the same distinction.
- For ADR, Median, and the percentile ladder, the retained sample can be smaller than the requested lookback because of available chart history. ATR RMA instead reports every completed session used to seed its decaying history, so its displayed n can exceed the selected period.
- ATR uses session true range and an explicit RMA seed, so it can differ from a plain high-low average and from ta.atr() on the same chart.
- Envelope rails can move inside current extremes after the session exceeds typical and can cross after twice typical. That geometry follows the conditional identities and is not a target map.
- The ladder uses nearest-rank completed ranges measured from the live low. Its rungs do not imply reaction, completion, or remaining probability.
- No state creates an alert, entry, exit, stop, position size, or trade instruction.
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.
Why does the dashboard say NO DATA?
The chart does not yet have a usable completed-session sample or a live session to measure. Load more history, confirm the symbol and session choice, and let at least one session complete.
Why is Range Used above 100%?
Today’s range has already exceeded the selected typical range. The percentage is intentionally uncapped, so 120% means the session has traveled 1.2 times that reference—not that the calculation is broken or that price must reverse.
Why did changing Session seem to do nothing?
The session filter matters most on intraday charts with separate regular- and extended-hours bars. It may not change a daily chart or a feed without extended-hours data. Compare it on an intraday chart with extended hours visible.
Why does this ATR differ from ADR or another ATR indicator?
Range Budget ATR uses completed-session true range, includes qualifying gaps, and applies its own RMA seed. ADR uses session high minus low, while another ATR may use chart bars or a different reset. Compare the same session definition and method before expecting the numbers to match.
Why is an envelope rail inside today’s range—or below the other rail?
Once today’s range exceeds the typical range, the remaining-distance math can place a rail inside the session extremes. After twice typical, the rails can cross. They are measurement guides, not support, resistance, or boundaries price must respect.
Why does p25 sit so far above the session low?
p25 is the full range of a historically narrow session, projected upward from today’s low. It is not 25% of today’s range. Read it as a completed-session percentile reference, not a quarter-range marker.
Why are values still visible after I hide the dashboard?
The dashboard switch hides only the on-chart table. The calculations remain available in TradingView’s Data Window by design.
Why can’t I create a Range Budget alert?
The published indicator does not expose fixed or dynamic alerts. Its states are for chart and Data Window interpretation, so TradingView will not offer a named Range Budget alert condition.