Indicators··6 min read

Session Open Anchored Move Measure

3 references, link-verifiedEditor of record: Shane CantyStandards review editorial standard · audit log

This indicator measures price movement from the start of a trading session, expressing the distance in both absolute points and as multiples of Average True Range. Traders use this to gauge how far price has extended from the session anchor relative to recent volatility, helping assess whether intraday moves are large or modest by the instrument's own standards.

//@version=6
indicator("Session Open Anchored Move Measure", overlay=true)

// Inputs
atrLength = input(14, "ATR Length", minval=1)
sessionType = input.string("DAY", "Session Type", options=["DAY", "WEEK", "MONTH"])
showPoints = input(true, "Show Point Values")
showAtrMultiples = input(true, "Show ATR Multiples")
labelOffset = input(1.5, "Label Offset (% above high)", minval=0.1, maxval=5) / 100

// Color scheme
bullColor = input(color.new(color.green, 0), "Bull Move Color")
bearColor = input(color.new(color.red, 0), "Bear Move Color")
textSize = input.string(size.small, "Label Size")

// Calculate session open
var sessionOpen = na
if timeframe.isintraday
    if sessionType == "DAY"
        if ta.change(time(timeframe.period, session.regular)) != 0 or barstate.isfirst
            sessionOpen := open
    else if sessionType == "WEEK"
        if ta.change(time("W")) != 0 or barstate.isfirst
            sessionOpen := open
    else if sessionType == "MONTH"
        if ta.change(time("M")) != 0 or barstate.isfirst
            sessionOpen := open
else
    sessionOpen := open

// Calculate ATR
atr = ta.atr(atrLength)

// Calculate moves
moveFromOpen = close - sessionOpen
movePoints = moveFromOpen
moveAtrMultiple = moveFromOpen / atr

// Determine colors based on direction
moveColor = moveFromOpen >= 0 ? bullColor : bearColor

// Plot session open line
plot(sessionOpen, "Session Open", color.new(color.gray, 60), linewidth=1, style=plot.style_dashed)

// Build label text
labelText = ""
if showPoints
    labelText += str.format("{0, number, 0.00}", movePoints) + " pts"
if showPoints and showAtrMultiples
    labelText += " / "
if showAtrMultiples
    labelText += str.format("{0, number, 0.00}", moveAtrMultiple) + "x ATR"

// Place label at high or low depending on direction
labelPrice = moveFromOpen >= 0 ? high * (1 + labelOffset) : low * (1 - labelOffset)

label.new(bar_index, labelPrice, labelText, 
     color=na, textcolor=moveColor, textalignment=text.align_center, 
     size=textSize, style=label.style_none)

// Optional: plot move as a line from session open to current close
plot(sessionOpen + movePoints, "Move Distance", color.new(moveColor, 40), linewidth=2)

How the code works

The indicator first anchors to the session open using Pine's time() function. When the session changes (detected by a change in the time field for that period), a new session open is recorded. This anchor is stable and does not repaint once set.

The Average True Range is calculated over the specified length (default 14 bars), measuring volatility as the typical trading range per bar.

On each bar, the script calculates two measures: the raw point difference between the close and the session open, and that same difference divided by the ATR value. The code also determines the direction (bull or bear) to apply the appropriate color.

The label is positioned above the high when price is up from the open, and below the low when price is down, offset by a configurable percentage to avoid overlapping with price bars. The distance is printed as both absolute points and ATR multiples.

Reading it on a chart

Watch for labels that accumulate as the session progresses. A value showing "+45 pts / 1.5x ATR" means price closed 45 points above the session open, and that move equals 1.5 times the recent 14-bar ATR. A move of 0.5x ATR is modest by recent volatility standards; a move of 3x ATR is unusually large.

Compare moves across sessions to see whether the current session's price extension is routine or extreme. For instance, on a stock where most sessions show moves of 0.3-0.8x ATR, a session that reaches 2x ATR has overextended. The point value confirms the absolute distance; use it to assess suitability for fixed-risk orders.

The dashed line anchoring each session's open serves as a visual reference. When price oscillates around the open (label near zero), the session is consolidating. When the label grows steadily in one direction, a trend is establishing within the session.

Limitations

The indicator measures only the close relative to the open; it does not account for intraday swings, wicks, or directional conviction. A session that opens at 100, rallies to 110, then closes at 105 will show only a +5 point move, even though an intraday swing of 10 points occurred. For gap-and-go scenarios, the open anchor may be far from pre-market price, distorting the perceived "move" relative to the prior close.

ATR is a lagging measure of volatility. In a sudden spike in volatility, the ATR multiple will understate the relative size of a move until the ATR catches up over the next 14 bars. Conversely, ATR overstates relative size during a period of rising calm after volatility drops.

The indicator assumes a regular session structure (daily, weekly, or monthly). On markets without clear session boundaries (e.g. 24-hour forex), the "session open" may not align with economic meaning. On overnight gaps or holiday breaks, the opening gap is included in the "move," which may skew interpretation of intraday momentum.

The label offset percentage is fixed. On very high-volatility bars with large wicks, labels may still overlap with price. Manual adjustment of the offset input may be necessary.


Key definitions

ATR (Average True Range): A measure of volatility calculated as the average of the true range (the greatest of: high, low, high, prior close, or prior close, low) over a specified number of bars, typically 14.

Session open: The first trade or official opening price of a trading session; in this indicator, it is anchored at the start of the selected period (day, week, or month) and held constant for the duration of that session.

Move multiple: The ratio of the current price move to the recent ATR, expressing how large the move is relative to typical volatility; a multiple of 2.0 means the move is twice the average bar range.

Intraday: Trades and price movements that occur within a single calendar day, as opposed to overnight or multi-day horizons.

Overlay: A chart drawing style in which the indicator plots are displayed on top of the price bars, using the same price axis.


References

  1. Wilder, J. Welles, New Concepts in Technical Trading Systems, 1978. (Foundational definition of ATR.)
  2. Investopedia, "Average True Range (ATR)", Investopedia, accessed 2025. https://www.investopedia.com/terms/a/atr.asp
  3. Pine Script v6 Documentation, "Built-in Variables", TradingView, 2024. https://www.tradingview.com/pine-script-docs/
  4. Investopedia, "Session", Investopedia, accessed 2025. https://www.investopedia.com/terms/s/session.asp

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-11-08. Educational research on historical data, not financial advice.

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. Found an error? Email support@prop-ledger.org and the paper is corrected or withdrawn.