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.
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน