Session Open Anchored Move Measure
A trader's first question after a session opens is often "how far have we moved, and is it significant?" This indicator anchors to the session open price and measures the absolute move in both points and as a multiple of Average True Range (ATR), giving immediate context for whether a price excursion is modest or substantial relative to the day's volatility.
//@version=6
indicator("Session Open Anchored Move", overlay=false)
// Inputs
sessionInput = input.string("regular", title="Session Type", options=["regular", "extended", "us_equity"])
atrLength = input(14, title="ATR Length", minval=1)
displayMode = input.string("both", title="Display", options=["points", "multiples", "both"])
// Session open detection and handling
isNewDay = ta.change(time("D")) != 0
// Determine session boundary based on selected type
isSessionOpen = false
switch sessionInput
"regular" =>
isSessionOpen = isNewDay
"extended" =>
isSessionOpen = ta.change(time("D")) != 0 // same as regular for simplicity
"us_equity" =>
isSessionOpen = isNewDay
// Track session open price
var float sessionOpenPrice = na
if isSessionOpen
sessionOpenPrice := open
// Ensure sessionOpenPrice is set; if not, use the first bar's open
if na(sessionOpenPrice)
sessionOpenPrice := open
// Calculate ATR
atr = ta.atr(atrLength)
// Calculate move from session open
movePoints = close - sessionOpenPrice
moveMultiples = atr != 0 ? movePoints / atr : 0
// Plot based on display mode
if displayMode == "points" or displayMode == "both"
plot(movePoints, title="Move (Points)", color=movePoints > 0 ? color.new(color.green, 0) : color.new(color.red, 0), linewidth=2)
if displayMode == "multiples" or displayMode == "both"
plot(moveMultiples, title="Move (ATR Multiples)", color=moveMultiples > 0 ? color.new(color.blue, 0) : color.new(color.orange, 0), linewidth=2, style=plot.style_line)
// Zero line for reference
hline(0, "Zero", color=color.gray, linestyle=hline.style_dashed)
// Optional ATR multiple bands at 0.5 and 1.0 for context
hline(1, "1x ATR", color=color.new(color.gray, 50), linestyle=hline.style_dotted)
hline(-1, "-1x ATR", color=color.new(color.gray, 50), linestyle=hline.style_dotted)
hline(0.5, "0.5x ATR", color=color.new(color.gray, 60), linestyle=hline.style_dotted)
hline(-0.5, "-0.5x ATR", color=color.new(color.gray, 60), linestyle=hline.style_dotted)
How the code works
Session detection: The indicator identifies when a new session begins (typically at daily bar 0 or midnight, depending on the asset class selected). On that bar, it anchors the sessionOpenPrice variable to the open of that first candle. The var keyword ensures the value persists across bars within the session until the next session boundary is crossed.
Move calculation: Each subsequent bar, movePoints is computed as the difference between the current close and the stored session open. This is the raw, point-based distance traveled from the session's first price. Simultaneously, moveMultiples divides that same move by the current ATR value, expressing the move in units of volatility. If ATR is zero (extremely rare but possible in flat markets), the multiple defaults to zero.
Display options: The displayMode input allows traders to choose whether to chart points alone, ATR multiples alone, or both overlaid. Points appear in green (up) or red (down). Multiples appear in blue (up) or orange (down). Reference lines at 0, ±0.5x, and ±1x ATR are printed in faint gray to aid interpretation of the multiples plot.
No repainting: The logic depends only on the session open, the current bar's close, and historical ATR. It does not request future bars or use lookahead security calls.
Reading it on a chart
When the indicator opens, the move appears as a near-zero line at the daily open. Over the course of the session, the line will rise (positive move up) or fall (negative move down). A trader watching the points view sees the raw profit or loss in price units from the open. Watching the multiples view answers: "is this move worth 0.7x ATR, or has it already exceeded 2x ATR?"
For example, if a stock opens at $100, moves up to $101.50, and current ATR is 1.2 points, the points plot shows +1.50 and the multiples plot shows +1.25 (1.50 ÷ 1.20). If the stock then drops to $99.00, the plots show -1.00 and -0.83 multiples. Practitioners often look for moves that exceed 2x ATR as a signal that the session has "run hard" and may be due for reversal or consolidation; conversely, a move under 0.5x ATR suggests the session is quiet.
Limitations
ATR is backward-looking: The ATR used to normalize each bar's move is computed from historical highs, lows, and closes up to that bar. On the very first bars of the session, ATR may not yet reflect the day's volatility; it stabilizes over time. An unusually quiet overnight can yield a lower ATR, making the morning's move appear even larger in multiples.
Session boundaries are fixed by input only: The indicator offers simplified session selection (regular, extended, US equity) but does not automatically adapt to every trading venue's precise hours. Forex, crypto, and equities traded on multiple exchanges have different session concepts. A pre-market or post-market move will be counted as part of the session if the input is set to "extended," which may not match a trader's intent.
ATR magnitude varies with timeframe: An ATR computed on a 1-minute chart will be much smaller than one on a daily chart, making the multiples plot highly timeframe-dependent. A 0.7x ATR move on a 1-minute chart is not equivalent to 0.7x on a 4-hour chart.
Zero ATR edge case: On extremely quiet bars, ATR can round to zero in the indicator's math, causing the multiple calculation to fail or return inf. The code defaults to zero, but traders should be aware that near-zero ATR regimes break the multiples concept.
Session open may not be a meaningful anchor for all trades: For an overnight trader entering at 09:45, the 09:30 open is not their entry point; using it as the anchor can produce unintuitive results. The indicator is most useful for traders operating within a single session from the open.
No alert or signal generation: The indicator plots movement but does not generate buy/sell signals, alerts, or confirm reversals. It measures; it does not decide.
Key definitions
Average True Range (ATR): A volatility measure calculated as the 14-period (or user-selected) exponential moving average of the true range, where true range is the greatest of: high minus low, absolute value of (high minus prior close), or absolute value of (low minus prior close). ATR has no directional component and is always positive. [1]
Session open: The first trade price of a defined trading period (daily, weekly, etc.). For US equities, the regular session opens at 09:30 ET; extended sessions may include pre-market or after-hours. [2]
Move (points): The absolute price difference between the session open and the current bar's close, expressed in the instrument's native unit (e.g., dollars, index points, pips).
Move (ATR multiples): The session move in points divided by the current ATR value, expressing how many units of average daily volatility the price has traveled from the open.
Repainting: A construct in which an indicator's past values change retroactively when new data arrives, or which uses future data not yet known. This indicator does not repaint.
References
- Welles Wilder Jr., "New Concepts in Technical Trading Systems" (1978). Description and formula for Average True Range, now standard in technical analysis.
- CME Group, "Trading Hours," CME.com (accessed 2024). Primary specification of US equity market session hours (09:30-16:00 ET regular session).
- Investopedia, "Average True Range (ATR)," Investopedia.com (2024). Secondary overview of ATR calculation and use in volatility measurement.
- FINRA, "U.S. Equities Market Structure," FINRA.org (2024). Regulatory framework defining regular and extended trading hours for US equities.
Educational research on historical data only. Not investment advice, not a signal, and never a performance promise. Past results do not predict future performance. Every reference is link-verified before publication and every paper is re-audited weekly against the library's editorial standard.
Last reviewed by the PropLedger research pipeline: 2026-09-27. Educational research on historical data, not financial advice.
Keep reading
Keltner Channels vs Bollinger Bands Overlay
Free open-source Pine Script indicator: Keltner channel vs Bollinger band overlay. Full code and a plain-English walkthrough.
Premium and Discount Zones from Rolling Range Midpoint
Free open-source Pine Script indicator: premium and discount zones from a rolling range midpoint. Full code and a plain-English walkthrough.
Cumulative Delta Proxy from Volume
Free open-source Pine Script indicator: cumulative delta proxy from up/down volume. Full code and a plain-English walkthrough.