OPEN-SOURCE SCRIPT
Updated

Session Range Expansion Planner [AGPro Series]

532
Session Range Expansion Planner [AGPro Series]

🧠 Core Idea

Is the session expanding from balance into a valid range extension, or is the break still too weak to trust as context?


📌 Overview / What it does

Session Range Expansion Planner is a 1H-focused intraday execution-readiness tool built around one clear workflow: define the early-session balance, track expansion beyond that range, and score whether the move has enough acceptance, volume support, volatility fit, and target room to deserve attention.

The script produces a session range box, accepted target-room bands, acceptance/rejection context, alerts, and a premium AGPro panel with a 0-100 planner score. The default visual preset is optimized for 1H and lower charts. Higher intraday charts such as 4H are intentionally kept clean by default.

It does not predict the next candle, automate entries, or issue buy/sell commands. It organizes session behavior into a structured decision layer so the user can evaluate the setup within their own plan.


🎯 Purpose & Design Philosophy

This script was built to fill the gap between simple session boxes and generic breakout indicators.

Most tools show where the session range is. Fewer tools explain whether the break from that range is actually being accepted, whether participation supports it, and whether there is usable room beyond the range.

Session Range Expansion Planner supports a planning mindset: define balance first, wait for expansion, check acceptance, evaluate room, then decide whether the context is worth further review.


⚡ Why This Script Is Different

Most session tools focus on marking opens, coloring sessions, or printing a breakout label as soon as price crosses a high or low.

This script does NOT act as a generic session high/low map, generic support/resistance tool, or broad session reaction scanner.

Instead, it treats the first part of the session as a balance structure and asks whether the later expansion has enough quality to become actionable context. The decision layer is built around acceptance bars, volume support, ATR regime, obstacle distance, and target-room quality.


⚙️ Methodology

1. Context Detection
The script reads the selected intraday session and builds an initial balance range from the first user-defined number of bars.

2. Reference Mapping
The session balance high and low become the only active expansion boundaries. The tool does not use PDH, PDL, weekly open, order blocks, FVGs, or generic swing zones.

3. Reaction Evaluation
When price breaks beyond the balance range, the engine measures acceptance closes, volume support, ATR regime quality, break distance, and nearby obstacle room.

4. Visual Output
The script displays a centered session range label, directional expansion labels, target-room band, acceptance/rejection labels, alerts, and a premium panel with score and next-action state.


🗺️ How to Read the Chart

Session Range Box = the early-session balance area.

Expansion Labels = the side where price first expands beyond the balance high or low.

Target-Room Band = the projected room beyond the broken boundary after expansion has been accepted, scaled by session range or ATR.

Acceptance Labels = confirmation that price has sustained closes beyond the range for the configured number of bars.

Rejection Labels = warning that price has failed back through the broken boundary.

Colors:
• Teal = upside expansion context
• Pink = downside expansion context
• Amber = neutral, warning, or rejection context
• Indigo = AGPro visual accent and target-room support

Panel = the decision cockpit showing planner score, session range, expansion side, acceptance, room score, and next action.


🚦 Signals & States

• Range Set → the initial balance window has completed.

• Expansion Up → price expanded above the session balance high.

• Expansion Down → price expanded below the session balance low.

• Accepted → the expansion held beyond the range for the required acceptance bars.

• Rejection Risk → price failed back through the broken boundary.

• Room Check Reached → price reached the projected target-room area.


🔔 Alerts Logic

Alerts trigger when:

• Upside range expansion is detected
• Downside range expansion is detected
• Expansion becomes accepted
• Rejection risk appears after expansion

Alerts are attention markers. They are not trade instructions and should be interpreted together with broader market context.


🧩 Confluence Logic

The strongest context appears when expansion direction, sustained acceptance, volume support, balanced ATR regime, and clean target room align at the same time.

When those conditions stack together, the planner score rises and the panel moves toward a review-ready state.


📊 When to Use

• 1H intraday charts with clear session behavior
• Opening balance or early-session range workflows
• Breakout quality review
• Volatility expansion planning
• Session continuation evaluation

The script is most useful when a trader wants to know whether a session range break is actually being accepted, not just whether a line was crossed.


⚠️ When NOT to Use

• Very low-liquidity symbols
• Extremely noisy micro timeframes
• Markets with unreliable volume
• Sessions with irregular trading hours
• News-driven candles where range expansion is disorderly

In weak conditions, reduce sensitivity or require stricter acceptance.


🎛️ Key Inputs

• Session Timezone → defines how the selected session is interpreted.

• Expansion Session → sets the active intraday window. The default full-day session is designed to work cleanly on crypto and other 24-hour symbols.

• Visual Timeframe Preset → controls which intraday timeframes show chart objects. The default is 1H and lower because 4H session expansion charts can become too compressed.

• Balance Window Bars → controls how many early-session bars define the range.

• Acceptance Bars → defines how much sustained closing behavior is required.

• Sensitivity → adjusts how fast the script recognizes expansion.

• Confirmation Mode → controls wick, close, or strict acceptance confirmation.

• Minimum Planner Score → sets the score threshold for review-ready context.

• ATR Length → controls volatility normalization and label spacing.

• Obstacle Lookback → estimates nearby structure that may reduce room quality.

• Target Room Multiplier → controls the projected target-room distance.

• Visual Settings → control range boxes, centered range label limit, rails, accepted target-room band, minimum visual score, optional expansion labels, optional room-check labels, optional range-set labels, label size, and object limits.

• Panel Settings → control panel visibility, location, theme, and font size.


🖥️ Interface & Visual Design

The interface is chart-first. The range box and target-room band carry the main visual story, while labels explain state transitions only when meaningful events occur.

The panel is intentionally compact. It gives a fast read of expansion quality without forcing the user to decode many separate plots.

The first panel row follows the AGPro standard: a single merged blue header row with only the script name.


🧪 Practical Usage Workflow

1. Apply the script to an intraday chart.

2. Confirm the correct session and timezone.

3. Let the initial balance window complete.

4. Watch for expansion beyond the balance high or low.

5. Check whether acceptance bars confirm sustained behavior.

6. Read the planner score and room score.

7. Use the next-action state as context for your own execution plan.


🔍 Interpretation Guidelines

A clean expansion is not just a break beyond the range. It should show acceptance, participation, reasonable volatility, and enough room before nearby obstruction.

Low scores usually mean the break is early, unsupported, too noisy, too extended, or too close to an obstacle.

The best use is comparative: review which sessions and symbols repeatedly produce clean accepted expansions versus weak false breaks.


🚫 What This Script Is NOT

• Not a prediction engine
• Not financial advice
• Not auto trading
• Not guaranteed signals
• Not a buy/sell command system
• Not a generic support/resistance map
• Not an order block, FVG, or liquidity sweep scanner


⚠️ Limitations & Transparency

Session behavior can vary across assets, timeframes, exchanges, and trading hours.

ATR regime and volume support are rule-based approximations, not certainty models.

On very low timeframes, labels may appear more frequently. On higher intraday timeframes, fewer but more meaningful events are expected.

Markets can expand cleanly and still reverse later. The tool measures context quality, not future certainty.


🧠 Market Context Notes

Session range expansion often becomes more meaningful when it is read together with broader trend, liquidity, volatility, and higher-timeframe structure.

The script deliberately stays focused on session balance and expansion quality. Users can combine it with their own broader framework without duplicating other AGPro tools.


🧾 Use Case Examples

When price breaks above the session range, holds above the balance high for the required acceptance bars, and room score remains strong, the panel may shift into review-ready continuation context.

When price breaks the range but quickly closes back inside the balance, the script marks rejection risk and the panel moves away from continuation review.


🧱 System Philosophy

AGPro tools are built to help traders organize context into clear decision layers.

Session Range Expansion Planner follows that philosophy by turning a common intraday event into a structured planning process: balance, expansion, acceptance, room, action.


🔐 Non-Promise Statement

No script can guarantee future price movement.

The score is a structured context model, not a certainty model.


📉 Risk Disclosure

Trading involves risk. Market conditions can change quickly, and historical session behavior does not guarantee future outcomes.

Users are responsible for their own decisions, risk management, and position sizing.

This script is provided for educational and analytical use only and does not provide financial advice.


📚 Educational Note

Use the script to study how different markets expand from early-session balance. The most valuable insight is not a single label, but the repeated relationship between range quality, acceptance, room, and market context.
Release Notes
🔧 UPDATE NOTES - VERSION 1.1

This update focuses on readability, visual hierarchy, panel flow, and first-glance volatility context.

The core purpose of the script remains unchanged.
This release improves how the existing session range expansion logic is presented, organized, and interpreted on the chart.

This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.


------------------------
What Changed
------------------------

• Refined the chart visual layer
Session range and target-room areas now use cleaner zone presentation with compact, high-contrast badges.

• Improved zone label architecture
Range and target-room text is no longer handled as weak native box text. The zones stay visual, while the readable badge carries the short context.

• Added clearer workflow language
Panel workflow states now use action-oriented review language such as Watch Expansion, Track Acceptance, Review Expansion, Check Room, and Stand Down.

• Added ATR context to the panel
The panel now shows whether the current ATR environment is Quiet, Balanced, or Noisy, with a compact ATR ratio for faster interpretation.

• Improved cooldown and active-state context
The Review row now shows when event-label cooldown is active, when noisy context is present, or when the planner is tracking acceptance.

• Tuned the default publication preset
The default visual timeframe preset now includes 4H and lower, while object retention and visual-score thresholds were tightened to reduce crowded intraday screenshots.

• Added timeframe-aware range badges
Centered range badges now stay active on 1H and lower, while 4H keeps the range boxes without clustered badge text.


------------------------
Visual Improvements
------------------------

• Replaced long multi-line zone text with short premium badges.

• Improved label spacing by increasing the default ATR label offset.

• Reduced visual clutter while preserving enough chart story for public screenshots.

• Refined target-room labels into compact ROOM score badges.

• Updated accepted-expansion labels to REVIEW score badges for clearer non-signal interpretation.

• Shortened centered range badges so they fit more comfortably inside compact session boxes.


------------------------
Interface & Usability
------------------------

• Reworked the panel into a clearer workflow-first layout.

• Added full panel location support including center positions.

• Preserved dark and light panel themes.

• Preserved panel show / hide and panel font-size controls.

• Kept the panel header as one merged blue row with only the script name.


------------------------
Behavior Notes
------------------------

This update does not change the core analytical logic of the script.

The session range, expansion side, acceptance counts, ATR normalization, volume score, volatility score, target-room score, and planner score remain based on the same model.

The goal is to improve clarity and usability, not to introduce predictive behavior.

Users should interpret outputs the same way as before, but with improved visual structure.


------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, timeframe selection, and session structure may affect how zones and labels appear.

Outputs should always be interpreted within broader market context.


------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice, trade instructions, or guaranteed trading outcomes.

Users remain responsible for their own decisions.
Release Notes
UPDATE NOTES - 1.5

This update focuses on panel wording polish and publication readability.

The core purpose of the script remains unchanged.
This release improves how non-target timeframes are explained in the panel.

This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.


------------------------
What Changed
------------------------

* Cleaner lower-timeframe guidance
Panel wording now uses clear phrases such as Use 2H or lower instead of compact symbols that can look awkward in small table cells.

* Improved non-intraday state text
Daily and weekly charts now present the script as Intraday Only with a clearer review prompt.

* Preserved V1.4 focused chart behavior
Historical zones remain disabled by default so public screenshots focus on the active session plan.


------------------------
Visual Improvements
------------------------

* Improved panel readability on 4H, daily, and weekly views.

* Reduced awkward table text compression.

* Kept the chart visuals, labels, zones, and scoring behavior unchanged.


------------------------
Behavior Notes
------------------------

This update does not change the core analytical logic of the script.

The session range calculation, expansion detection, acceptance model, scoring components, alerts, and chart object rules remain unchanged.


------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or guaranteed trading outcomes.

Users remain responsible for their own decisions.
Release Notes
🔧 UPDATE NOTES - v1.6

This update adds an expansion follow-rate proof and contrast-safe badge text.

The core purpose of the script remains unchanged.
It continues to build the session balance range, track expansion beyond it, evaluate acceptance,
volume, volatility and target-room quality into a 0-100 planner score.

This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.

------------------------
What Changed
------------------------

- Expansion Follow Rate proof layer
The panel now reports how often an accepted expansion historically followed through in the
expansion direction before falling back inside the range, shown with the sample count.

- Expansion proof window input
A new setting controls the window used to measure post-acceptance follow-through.

- Contrast-safe badge text
Side-colored badges now pick readable text automatically, fixing white text on the downside
pink badges for the room, track and review labels.

- Honest, conservative counting
Each accepted expansion is counted once, and a return inside the range or a window expiry without
follow-through is treated as not-followed, so the rate stays realistic.

------------------------
Visual Improvements
------------------------

- Contrast-safe text on the room, expansion and review badges, so readouts stay readable on
amber, pink and teal backgrounds on both light and dark charts

- Kept the session range box, target-room band, rails and centered badges unchanged

- Preserved the tuned visual timeframe preset and object limits

- Maintained the clean, single-session publication view

------------------------
Interface & Usability
------------------------

- Added an Expansion Rate row for an at-a-glance follow-through track record

- Added a window setting so the proof measures prompt follow-through

- Improved badge legibility across upside and downside expansions

- Enhanced overall user experience without changing the core planner logic

------------------------
Behavior Notes
------------------------

This update does not change the core analytical logic of the script.

The balance range, expansion detection, acceptance, scoring, states and target-room are unchanged.
The Expansion Rate is a separate historical track-record layer and does not alter detection.

------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool that is designed for intraday timeframes.

Market conditions such as volatility, liquidity, session and timeframe differences may affect how
the range, expansion and the rate appear.

Outputs should always be interpreted within broader market context.

------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or guaranteed trading outcomes.

Users remain responsible for their own decisions.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.