OPEN-SOURCE SCRIPT
Daily ATR Box

Daily ATR Box
A compact stats table — ATR, gap size, pre-market volume, and how much of the stock's typical daily range is already used — in one glance instead of eyeballing the chart and doing the math yourself. Renders in its own pane, not as an overlay on price.
What it shows
ATR(N) — the stock's N-day average true range (default 14), pulled from the daily timeframe.
Gap — today's gap vs. the prior session's close, in price and as a % of ATR. Live against last price during pre-market; freezes at the official 9:30 open print once the regular session starts, so the number stops drifting once the real open is in.
PM Vol — pre-market volume as a % of average daily volume (ADV, default 20-day lookback). Color-coded green at 30%+ ADV, yellow at 10%+ — rough thresholds for "is this actually in play" pre-market. Needs an intraday chart with extended-hours data on; reads 0 on an RTH-only chart, and is only as complete as your feed's extended-hours reporting.
Used — % of the stock's typical daily range (ATR) already consumed by today's regular-session high-low range. Green under 50%, yellow 50–79%, red 80%+, as a heads-up for when the day's typical move is mostly spent.
Left — remaining ATR in absolute price terms (floored at zero).
vs O — current price change vs. today's regular-session open.
Notes on accuracy
Range and gap tracking reset at the daily rollover rather than at the 9:30 session start, so pre-market always reflects the current day instead of showing yesterday's stale numbers. Prior close is tracked from the last regular-session bar actually seen rather than a fixed one-bar lookback on the daily series, which avoids the gap reading against the wrong day around weekends and holidays.
Inputs: ATR length, ADV lookback (days), table position, text size.
A compact stats table — ATR, gap size, pre-market volume, and how much of the stock's typical daily range is already used — in one glance instead of eyeballing the chart and doing the math yourself. Renders in its own pane, not as an overlay on price.
What it shows
ATR(N) — the stock's N-day average true range (default 14), pulled from the daily timeframe.
Gap — today's gap vs. the prior session's close, in price and as a % of ATR. Live against last price during pre-market; freezes at the official 9:30 open print once the regular session starts, so the number stops drifting once the real open is in.
PM Vol — pre-market volume as a % of average daily volume (ADV, default 20-day lookback). Color-coded green at 30%+ ADV, yellow at 10%+ — rough thresholds for "is this actually in play" pre-market. Needs an intraday chart with extended-hours data on; reads 0 on an RTH-only chart, and is only as complete as your feed's extended-hours reporting.
Used — % of the stock's typical daily range (ATR) already consumed by today's regular-session high-low range. Green under 50%, yellow 50–79%, red 80%+, as a heads-up for when the day's typical move is mostly spent.
Left — remaining ATR in absolute price terms (floored at zero).
vs O — current price change vs. today's regular-session open.
Notes on accuracy
Range and gap tracking reset at the daily rollover rather than at the 9:30 session start, so pre-market always reflects the current day instead of showing yesterday's stale numbers. Prior close is tracked from the last regular-session bar actually seen rather than a fixed one-bar lookback on the daily series, which avoids the gap reading against the wrong day around weekends and holidays.
Inputs: ATR length, ADV lookback (days), table position, text size.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.