Trade Location Quality [AGPro Series]Trade Location Quality
🧠 Core Idea
Is price in a clean trade location, or is it too close to obstruction, invalidation, or noisy range edges?
📌 Overview / What it does
Trade Location Quality is a chart-overlay risk-location planner designed to evaluate whether the current price area is practical for setup review.
The script measures range position, nearby obstruction rails, ATR-normalized risk distance, target room, trend support, and volatility fit. These inputs are combined into a 0-100 Location Quality Score with a clear state such as Clean Location, Watch Location, Obstructed, Danger Close, Risk Wide, or Poor Location.
It produces a forward location window, target/risk rails, compact event labels, alert conditions, and a premium AGPro panel. It does not predict price direction, automate execution, or print direct buy/sell commands.
🎯 Purpose & Design Philosophy
This script was built to solve a common planning problem: a setup may look interesting, but the trade location may still be weak because price is too stretched, too close to the next obstacle, or too close to invalidation.
The goal is to help traders think in terms of location quality before reacting to a setup. It supports a planning mindset: check context, evaluate room, review risk, then decide whether the area deserves attention.
It is designed for traders who want a clean decision layer rather than another generic signal marker.
⚡ Why This Script Is Different
Most tools focus on detecting a level, zone, breakout, or signal.
This script does NOT build a premium/discount map, OTE model, generic support/resistance scanner, order-block map, or prediction engine.
Instead, it asks a narrower planning question: is the current location clean enough to evaluate, or is the chart already blocked by risk, obstruction, or poor range position?
⚙️ Methodology
1. Context Detection
The script identifies the active evaluation side using either Auto Context, Long Context, or Short Context. Auto Context follows the trend-support basis.
2. Reference Mapping
It maps the recent range, nearest obstruction rails, opposite-side risk rail, estimated invalidation reference, and ATR-normalized room.
3. Reaction Evaluation
It scores location quality using range position, target room, risk distance, trend support, and volatility fit.
4. Visual Output
It displays a forward location window, target/risk rails, state labels, alerts, and a compact AGPro panel.
🗺️ How to Read the Chart
Location Window = the current area where price location is being evaluated.
Target Obstruction Rail = the nearest meaningful obstacle in the evaluation direction.
Risk Rail = the opposite-side reference used to estimate invalidation distance.
Labels = compact state markers showing the current planner condition and score.
Colors = teal and indigo suggest stronger quality, amber suggests caution, and pink/red suggests weak or risky location.
Panel = summarizes score, state, range position, obstruction distance, risk state, and next action.
🚦 Signals & States
• Clean Location → location score is strong, room is sufficient, and risk distance is balanced.
• Watch Location → context is acceptable but not strong enough for the clean-location state.
• Obstructed → price is too close to the next target-side obstruction rail.
• Danger Close → invalidation is too close for a balanced location read.
• Risk Wide → invalidation is too far away, making the location less efficient.
• Poor Location → score and context are not strong enough for planning attention.
🔔 Alerts Logic
• Clean Location → triggers when the script enters the Clean Location state.
• Obstructed Location → triggers when price becomes too close to the next obstruction rail.
• Risk Location Warning → triggers when risk distance becomes too tight or too wide.
• Watch Location → triggers when a watchable location context appears without reaching Clean Location.
Alerts are attention markers. They are not trade instructions.
🧩 Confluence Logic
Location quality improves when range position, target room, balanced risk distance, trend support, and stable volatility align.
The strongest read appears when the score is high and the panel also shows enough obstruction distance with a balanced risk state.
📊 When to Use
• During setup planning before reacting to a signal.
• Around pullbacks where risk and target room matter.
• During trend continuation review when price may be clean or already stretched.
• Before breakout or reversal evaluation when nearby obstruction can change the quality of the idea.
• On liquid markets where ATR and pivot references are meaningful.
⚠️ When NOT to Use
• Extremely low-liquidity markets with unreliable candles.
• Highly noisy periods where rails change too frequently.
• Extreme volatility spikes where ATR-based distance can expand rapidly.
• Charts where the user has no broader context for directional evaluation.
• As a standalone reason to enter or exit a trade.
🎛️ Key Inputs
• Evaluation Context → selects Auto, Long, or Short planning context.
• Location Lookback → defines the recent structure window.
• Obstruction Pivot Length → controls how strict obstruction rails are.
• Minimum Clean Score → sets the quality threshold for Clean Location.
• Minimum Target Room ATR → controls how much room must exist before the next obstruction.
• Risk Buffer Inputs → define what counts as too close or too wide.
• Visual Settings → control compact or detailed labels, rails, location window, panel visibility, theme, location, and font sizes.
🖥️ Interface & Visual Design
The interface is intentionally chart-first.
The location window shows the active evaluation area without filling the chart with many competing zones. The obstruction rails provide practical reference points. The default labels use compact state tags, while hover tooltips retain the deeper score, room, risk, and action context. Cooldown and maximum-visible settings keep the chart active but not crowded.
The panel follows the AGPro publication layout with a single merged blue title row, adjustable location, adjustable theme, and adjustable font size.
🧪 Practical Usage Workflow
1. Read the panel score and state.
2. Check whether target-side room is open or obstructed.
3. Review whether risk distance is balanced, too close, or too wide.
4. Compare the location window with broader market context.
5. Treat alerts and labels as attention markers, not decisions.
🔍 Interpretation Guidelines
A high score means the location is cleaner relative to the script's rule set. It does not mean price must move in the evaluated direction.
An obstructed state means room is limited before the next nearby reference. It does not mean price cannot break through that area.
A risk warning means the current location is less balanced for planning. It should be interpreted with timeframe, volatility, and broader structure.
🚫 What This Script Is NOT
• Not a prediction engine.
• Not financial advice.
• Not auto trading.
• Not guaranteed signals.
• Not a buy/sell signal service.
• Not a premium/discount or OTE zone engine.
• Not a generic support/resistance zone scanner.
⚠️ Limitations & Transparency
Location quality depends on the selected lookback, pivot length, volatility profile, and timeframe.
Different markets can produce different rail behavior. High volatility may widen risk distance. Low volatility may compress target room. Small timeframes may produce more frequent state changes.
The script is rule-based and should be read as a planning tool inside broader analysis.
🧠 Market Context Notes
Trade location is not only about where price is. It is also about what sits nearby.
A location can look attractive but still be weak if there is not enough clean room before the next obstruction. A location can also be risky if invalidation is too close or too far for the current volatility environment.
This script organizes those conditions into a single readable decision layer.
🧾 Use Case Examples
When price pulls back inside a trend and the score improves while risk remains balanced, the chart may deserve closer review.
When price is near a target-side rail and the panel shows Obstructed, the user can recognize that nearby room is limited.
When volatility expands and risk distance becomes too wide, the script can mark the location as less efficient for planning.
🧱 System Philosophy
Trade Location Quality follows the AGPro decision-engine approach: the script should help the user evaluate context, quality, risk, room, and next action without promising an outcome.
The goal is not to add another signal. The goal is to improve the quality of the planning process.
🔐 Non-Promise Statement
No script can guarantee direction, continuation, reversal, or outcome.
This tool provides structured chart context only.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own analysis, risk controls, position sizing, and trading decisions.
This script does not provide financial advice, investment advice, or guaranteed trading outcomes.
📚 Educational Note
Use the script to study how trade location changes as price moves closer to risk, target, obstruction, and range edges. The most useful reading comes from comparing the panel state with the visible chart context.
Indicator



