OPEN-SOURCE SCRIPT

Daily ATR Box

308
Daily ATR Box
A volatility-based price box anchored to the key levels traders watch most — previous day high/low, premarket high/low, current day high/low, current close, or a manual price — sized automatically by the Daily ATR so the range always reflects current market conditions.
How It Works
The box height equals the Daily Average True Range multiplied by a user-defined multiplier. You select the anchor level and the indicator places the box either above or below it depending on the anchor type. High anchors (Previous Day High, Premarket High, Current Day High) place the box top at the level and extend downward, showing how far price may retrace after testing that high. Low anchors (Previous Day Low, Premarket Low, Current Day Low) place the box bottom at the level and extend upward, showing the potential bounce range from that support.
Anchor Modes

Previous Day High — Box top sits at PDH, extending down by one ATR. Useful for measuring retracement potential after reclaiming the prior session's high
Previous Day Low — Box bottom sits at PDL, extending up by one ATR. Identifies the bounce range off prior session support
Premarket High — Box top sits at the current session's premarket high, extending downward. Updates live during premarket and locks at the 9:30 AM ET open
Premarket Low — Box bottom sits at the current session's premarket low, extending upward. Same live tracking and lock behavior as premarket high
Current Day High — Box top sits at the highest point reached so far in the current session including premarket, extending downward. Updates in real time as new highs are made
Current Day Low — Box bottom sits at the lowest point reached so far in the current session including premarket, extending upward. Updates in real time as new lows are made
Current Close — Box floats with the current bar's close price. Useful for projecting the ATR range from wherever price currently sits
Manual Price — Set any custom price level as the anchor for full flexibility

Features

ATR length and multiplier fully adjustable
Drag Offset input shifts the entire box up or down freely without changing the anchor
Box width adjustable in bars
Optional right extension to project the zone forward on the chart
Fully customizable fill and border colors
Label displays the live ATR value, anchor mode, anchor price, and drag offset when applied
All key levels plotted to the Data Window for easy reference — ATR, Box Top, Box Bottom, PDH, PDL, Premarket High, Premarket Low, Current Day High, Current Day Low
Built in Pine Script v6

Recommended Usage
Designed for intraday charts from 1 minute to 15 minutes where the daily ATR provides meaningful context for expected range. Pair with volume or order flow tools to identify whether price is likely to accept or reject the ATR zone when it arrives at a key anchor level.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.