OPEN-SOURCE SCRIPT
Updated

Expansion Target Planner [AGPro Series]

755
Expansion Target Planner [AGPro Series]

🧠 Core Idea

After expansion is confirmed, where is the reasonable target band, how clean is the path, and what should be reviewed next?


📌 Overview / What it does

Expansion Target Planner [AGPro Series] is a chart-first risk-target planning tool designed to evaluate the target area after a confirmed range expansion.

Instead of drawing a generic target line or copying a measured-move pattern, the script studies the prior range edge, current ATR, continuation pressure, recent structure obstacles, volatility state, and an invalidation shelf behind the move. It then converts that context into a 0-100 Target Quality score and a clear next-action state.

The output is a practical planning workflow: an expansion target band, invalidation shelf, target midpoint guide, path obstruction marker, compact chart labels, alert conditions, and a clean AGPro decision panel. It does not predict the future, automate decisions, or guarantee that any target band will be reached.


🎯 Purpose & Design Philosophy

This script was built for traders who need a cleaner way to evaluate expansion targets after price has already shown confirmation.

Many tools focus on finding a breakout, drawing an equal measured move, or plotting fixed take-profit levels. This tool fills a different gap: it asks whether the next target area is reasonable, whether the path is blocked, and whether the invalidation reference still supports the plan.

The design supports a disciplined target-review mindset. It helps users separate a clean expansion path from a stretched, obstructed, expired, or invalidated plan.


⚡ Why This Script Is Different

Most tools focus on measured moves, ABCD projections, fixed target ladders, or generic breakout confirmation.

This script does NOT become a measured-move projection tool, ABCD pattern detector, take-profit ladder, auto trading system, or generic support/resistance map.

Instead, it builds one active expansion target plan after confirmation and evaluates the quality of that plan. The core output is not a trade command. It is a planning state that helps users review whether the target band, invalidation shelf, volatility, and structure path still make sense.


⚙️ Methodology

1. Context Detection
The script identifies whether price has confirmed expansion beyond a prior range edge. Users can keep the side on Auto or force Long Expansion / Short Expansion.

2. Reference Mapping
Once confirmation appears, the script locks an active target plan. It maps the expansion anchor, ATR-adjusted target distance, target band, invalidation shelf, and recent pivot-based path obstacle.

3. Reaction Evaluation
The script scores the plan using expansion strength, ATR projection fit, nearby structure, continuation pressure, volume support, trend support, and volatility state.

4. Visual Output
The chart displays the active target band, invalidation shelf, guide lines, obstruction marker, event labels, alerts, and AGPro panel state.


🗺️ How to Read the Chart

Zones = the forward target band and the invalidation shelf behind the expansion.

Labels = the current target planning state, such as TARGET READY, WATCH, OBSTRUCTED, TARGET HIT, or INVALID REVIEW.

Colors = green/teal supports cleaner bullish expansion quality, pink marks bearish or risk states, yellow marks caution or obstruction, and indigo is used as a neutral planning accent.

Panel = the compact decision view showing Expansion Side, Target Band, Invalidation, Target Quality, and Action.


🚦 Signals & States

• TARGET READY → the target band has acceptable quality and the path is clean enough for review.

• WATCH → target context is improving, but not enough conditions are aligned yet.

• OBSTRUCTED → a recent structure obstacle sits between current price and the target band.

• TARGET HIT → price has interacted with the active target band.

• INVALID REVIEW → price has crossed the invalidation shelf and the plan should be reviewed.

• EXPIRED → the active plan has spent too many bars without completing.


🔔 Alerts Logic

Alerts trigger when the active target state changes into an important review condition.

• Target Ready alert → target quality moves into a stronger review state.

• Target Watch alert → target context improves but remains incomplete.

• Path Obstructed alert → a structure obstacle blocks the target path.

• Target Band Touched alert → price reaches the active target band.

• Invalidation Review alert → price crosses the invalidation shelf.

Alerts are attention markers, not trade instructions.


🧩 Confluence Logic

The Target Quality score improves when expansion confirmation, ATR projection fit, continuation pressure, volume support, volatility state, and open structure path align.

When the target distance is reasonable, the close is efficient, volume supports the move, and no nearby obstacle blocks the path, the context becomes stronger.


📊 When to Use

• After confirmed range expansion

• During breakout continuation review

• When evaluating whether a target area is too close, too far, or structurally blocked

• When a trader wants target context without a fixed take-profit ladder

• During volatility expansion phases where target planning matters more than another signal


⚠️ When NOT to Use

• Very low-liquidity markets

• Extremely noisy sideways chop

• News-driven spikes where ATR and structure become unstable

• Markets with unreliable volume if volume support is central to your process

• Any situation where the user expects automatic trade instructions


🎛️ Key Inputs

• Expansion Side → Auto, Long Expansion, or Short Expansion planning.

• Prior Range Lookback → defines the range edge used for confirmation.

• Confirmation Break ATR → controls how far beyond the range edge price must close.

• Range Projection Multiple → adjusts how much prior range width contributes to the target distance.

• ATR Projection Multiple → adjusts how much current volatility contributes to the target distance.

• Target Band Width ATR → controls the visual width of the target band.

• Invalidation Shelf Lookback → defines the reference shelf behind the expansion.

• TARGET READY / WATCH thresholds → control how selective the state engine is.

• Visual settings → control target band, shelf, guide lines, obstruction marker, labels, panel location, theme, and font sizes.


🖥️ Interface & Visual Design

The interface is built around one active target plan.

The target band is displayed forward on the chart with centered text. The invalidation shelf is shown behind the move so the risk reference is visible without turning the script into a generic support/resistance tool.

The panel follows the AGPro public-release standard with one merged blue header row containing only the script name. The layout is compact and designed for quick reading during live chart review.


🧪 Practical Usage Workflow

1. Read the panel to identify the active Expansion Side and Target Quality.

2. Check whether the target band is clean or obstructed.

3. Review the invalidation shelf behind the expansion.

4. Use labels and alerts as attention markers.

5. Confirm the broader market context with your own process.


🔍 Interpretation Guidelines

Treat the target band as a planning area, not a guaranteed destination.

A higher Target Quality score means the target plan is cleaner according to the script rules. It does not mean the move must continue.

An OBSTRUCTED state does not mean price cannot move through the obstacle. It means the path contains structure that deserves review.

An INVALID REVIEW state means the active shelf has been crossed and the plan context has changed.


🚫 What This Script Is NOT

• Not a prediction engine

• Not financial advice

• Not auto trading

• Not guaranteed signals

• Not a measured-move projection system

• Not an ABCD pattern scanner

• Not a take-profit ladder


⚠️ Limitations & Transparency

• Timeframe differences can change expansion quality and target distance.

• Volatility shifts can make a previously clean target band less useful.

• Recent structure may not capture every important higher-timeframe obstacle.

• Volume-based scoring can be less useful on symbols with unreliable volume.

• No rule-based tool can fully account for news, liquidity shocks, or sudden regime changes.


🧠 Market Context Notes

Expansion targets are more useful when the market has already shown range release and the target path is not immediately blocked by nearby structure.

Liquidity, volatility, and structure should be read together. A target band can look reasonable by distance but still become lower quality if the path is obstructed or volatility becomes overheated.


🧾 Use Case Examples

When price closes beyond a prior range edge with strong close location and the target path is open, the script may show TARGET READY.

When price expands but a recent pivot sits directly between current price and the target band, the script may show OBSTRUCTED.

When price crosses the invalidation shelf behind the plan, the script may show INVALID REVIEW.


🧱 System Philosophy

AGPro Series tools are designed to support structured decision review, not emotional signal chasing.

This script follows that philosophy by focusing on target quality, invalidation context, and next-action state rather than a simple directional signal.


🔐 Non-Promise Statement

No target band is certain.

No score guarantees continuation.

No alert should be treated as a trade instruction.


📉 Risk Disclosure

Trading involves risk.

Users are responsible for their own decisions, position sizing, risk controls, and market interpretation.

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


📚 Educational Note

Use this tool to study how target quality changes after expansion confirmation.

The strongest value comes from comparing the target band, obstruction marker, invalidation shelf, and broader market context together.
Release Notes
🔧 UPDATE NOTES - V1.1

This update focuses on chart readability, premium visual structure, and cleaner target-plan interpretation.

The core purpose of the script remains unchanged.
This release improves how the existing expansion target logic is presented, organized, and reviewed 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 target-band presentation
The expansion target band now uses a cleaner visual zone with a separate centered status badge instead of embedded zone text.

• Added a dedicated invalidation shelf badge
The invalidation shelf remains clearly labeled with a centered badge, keeping the zone readable without relying on low-contrast text.

• Improved chart-label hierarchy
Target Ready, Watch, Obstructed, Target Hit, and Invalid Review labels now use cleaner premium casing and stronger contrast.

• Rebalanced default label density
Default label spacing and retention were adjusted to reduce clutter while keeping public screenshots informative.

• Upgraded panel readability
The AG Pro panel now uses a clearer workflow structure with State, Target Quality, Target Band, Shelf / Path, and Review rows.


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

• Replaced zone-embedded text with separate filled badges for better contrast

• Kept target and shelf zones labeled at the center of the visual area

• Reduced visual clutter from repeated labels and guide objects

• Improved right-side planning readability with cleaner state wording

• Preserved the chart-first layout while making the active plan easier to scan


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

• Panel header remains a single merged blue AG Pro title row

• Panel visibility, location, theme, and font size remain user-controlled

• Chart label font size remains adjustable from settings

• Target quality is shown as a simple score and grade for faster interpretation

• Shelf and path status are separated from the target score to reduce confusion


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

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

The script still evaluates expansion target quality using prior range release, ATR projection, structure path, continuation pressure, volatility context, and invalidation shelf behavior.

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, and timeframe differences may affect how target plans appear.

Target bands, shelves, and labels 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.
Release Notes
UPDATE NOTES - Version 1.2

This update focuses on adding a confirmation-anchored proof layer to the panel.

The core purpose of the script remains unchanged.
This release adds a proof layer that measures how often a target plan reached its target band
before its invalidation shelf, and removes a redundant panel row.

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
------------------------

* Added a Proof Layer (Follow / Hold / React / Flip)
The panel now reports how target plans resolved on the current symbol and timeframe. Each time a
plan is created on a confirmed expansion, the script tracks it forward using the plan's own levels:
the entry is the confirmation close, the favorable reference is the near edge of the target band,
and the adverse reference is the invalidation shelf with its review buffer.
- Follow Rate : share of plans that reached the target band before the invalidation shelf
- Hold Rate : share whose invalidation shelf was not crossed by resolution
- React Rate : share that produced an early favorable reaction toward the target band
- Flip Rate : share that crossed the invalidation shelf, meaning the plan was invalidated
A sample size (n) is shown so the rates are read in context, and they display as "building" only
until the first plan resolves. Plans that neither reach the band nor cross the shelf resolve at the
plan expiration horizon.

* Removed the redundant review row
The review row repeated the same next-action already shown by the workflow row, so the panel now
carries the proof layer while keeping the workflow, state, target-quality, target-band, and
shelf/path rows.

* Added hidden proof outputs
The Follow, Hold, React, and Flip rates are exported as hidden plots so they can be used in alerts
and screeners without adding chart clutter.


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

* Kept the expansion target band, invalidation shelf, target/shelf guides, path obstruction marker,
centered badges, and event labels exactly as before.

* Preserved the existing label cooldown, context-label spacing, and max-visible-label limits so the
chart stays informative but not crowded.


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

This update does not change the core expansion, scoring, target-band, shelf, or obstruction logic.

The proof rates are descriptive statistics of target plans on the current symbol and timeframe.
They measure how often a plan reached its target band before its invalidation shelf, mirroring the
script's own Target Hit and Invalid Review resolution, and they do not change how plans, scores,
bands, or shelves are produced.

Users should interpret outputs the same way as before, now with added reliability context.


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

The script remains a rule-based analytical tool.

Proof rates depend on the available history and on how many plans were created on the current symbol
and timeframe; a small sample (low n) should be treated with caution. Each plan is counted once, with
the entry, target band, and invalidation shelf frozen at the confirmation bar. Market conditions such
as volatility, liquidity, and timeframe differences may affect how plans and rates 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.