OPEN-SOURCE SCRIPT
Updated Weekly Range Break Planner [AGPro Series]

# Weekly Range Break Planner [AGPro Series]
🧠 Core Idea
Is the weekly range break strong enough to monitor, or is price likely to fail back inside the range?
📌 Overview / What it does
Weekly Range Break Planner is a weekly range decision-support script built to evaluate whether price is breaking beyond the previous week's high or low with enough structural quality.
The script maps the previous weekly high, low, and midpoint, detects bullish or bearish breaks, builds a retest shelf around the broken boundary, scores the break from 0 to 100, and summarizes the current state inside a compact AG Pro panel.
It does not predict price direction, automate trades, or provide guaranteed signals. It is designed to organize weekly range context, break quality, retest behavior, target room, and invalidation risk into a clean visual workflow.
🎯 Purpose & Design Philosophy
Weekly highs and weekly lows are widely watched reference points, but not every break beyond them is meaningful.
This script was built for traders who want to separate a clean weekly range break from a weak expansion, failed breakout, or noisy return back into the prior range.
The design supports structured observation: range first, break quality second, retest behavior third, and action state last.
⚡ Why This Script Is Different
Most tools mark weekly highs and lows or show simple breakout signals.
This script does NOT stop at drawing weekly levels.
Instead, it evaluates what happens after price breaks the range: whether the break has enough close quality, whether the retest shelf is respected, whether target room remains, and whether the context is still valid.
⚙️ Methodology
1. Previous Weekly Range Mapping
2. Break Boundary Detection
3. Retest Shelf Construction
4. Break Quality Scoring
5. Target Room Evaluation
6. Invalidation And Expiration Handling
7. Panel And Alert Output
🗺️ How to Read the Chart
The weekly range box marks the previous week's high-low structure.
The high and low rails show the main break boundaries.
The midpoint line helps users understand where price is relative to the prior weekly balance.
The retest shelf appears around the broken boundary after a weekly range break.
READY BREAK labels appear when the break context meets the required score threshold.
Target rails show projected continuation references after a qualified break.
The panel summarizes Range State, Break Score, Retest, Room, and Action.
🚦 Signals & States
• READY → A qualified weekly range break has formed.
• MONITOR → Price has broken a weekly boundary and the script is evaluating quality.
• WAIT → The previous weekly range is valid, but no active break context is present.
• INVALIDATED → Price failed back inside the weekly range after a break.
• EXPIRED → The break window closed without a qualified context.
• BLOCKED → The previous weekly range is not suitable for evaluation.
🔔 Alerts Logic
Bullish Weekly Range Break Ready triggers when price breaks above the previous weekly high with enough quality.
Bearish Weekly Range Break Ready triggers when price breaks below the previous weekly low with enough quality.
Weekly Range Break Invalidated triggers when price fails back inside the prior weekly range after a break.
Weekly Range Break Expired triggers when the evaluation window closes without a qualified break state.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The break score combines weekly range fit, close distance beyond the boundary, retest shelf behavior, time quality, relative volume, and available target room.
When these elements align, the context becomes stronger.
When they do not align, the script remains in WAIT, MONITOR, INVALIDATED, EXPIRED, or BLOCKED state.
📊 When to Use
• Weekly high and weekly low break analysis
• Breakout-retest workflows
• Intraday monitoring around prior weekly extremes
• Swing context planning
• Trend continuation after a range expansion
⚠️ When NOT to Use
Avoid relying on this script in extremely low-liquidity markets, very noisy symbols, holiday sessions, or conditions where the previous weekly range is not meaningful.
It should not be used as a standalone decision tool without broader market context, risk planning, and independent confirmation.
🎛️ Key Inputs
• Minimum Weekly Range filters weak or compressed prior weekly ranges.
• Break Buffer ATR controls how far price must close beyond the weekly boundary.
• Retest Shelf ATR controls the depth of the shelf around the broken boundary.
• Invalidation Buffer ATR controls how far price must close back inside the range before invalidation.
• Minimum Ready Score controls how strong the score must be before READY appears.
• Target inputs define continuation reference rails from the broken boundary.
• Visual settings control boxes, rails, labels, right-side tags, panel location, and font size.
🖥️ Interface & Visual Design
The interface is designed to make the weekly range context readable at a glance.
The chart shows the prior weekly range, the active break boundary, the retest shelf, and target-room references without turning the screen into a generic breakout overlay.
The AG Pro panel gives compact decision context while preserving chart visibility.
🧪 Practical Usage Workflow
1. Check whether the previous weekly range is valid.
2. Watch for a close beyond the weekly high or low.
3. Observe the retest shelf around the broken boundary.
4. Read the break score, retest state, and room value.
5. Treat READY as an attention state and confirm with broader market context.
🔍 Interpretation Guidelines
A higher break score means the weekly range break is cleaner according to the script logic.
A clean retest shelf response can strengthen the context.
Low remaining room means the move may already be extended relative to the projected target.
READY means the context deserves attention, not that price must continue.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an auto-trading system.
It does not provide guaranteed signals.
It does not replace risk management or independent analysis.
⚠️ Limitations & Transparency
Weekly range behavior changes across markets, timeframes, volatility regimes, and liquidity conditions.
The score is rule-based and depends on current chart timeframe, ATR normalization, volume behavior, and the previous weekly range.
Different symbols may require different sensitivity settings.
🧠 Market Context Notes
Weekly range breaks can be more meaningful when aligned with trend, liquidity response, volume participation, and clean retest behavior.
Breaks that quickly return inside the prior weekly range often need extra caution.
🔐 Non-Promise Statement
No script can guarantee future price behavior.
This tool provides structured visual context only.
📉 Risk Disclosure
Trading involves risk.
Users remain responsible for their own decisions.
This script is for educational and analytical purposes only and does not provide financial advice or guaranteed trading outcomes.
🧠 Core Idea
Is the weekly range break strong enough to monitor, or is price likely to fail back inside the range?
📌 Overview / What it does
Weekly Range Break Planner is a weekly range decision-support script built to evaluate whether price is breaking beyond the previous week's high or low with enough structural quality.
The script maps the previous weekly high, low, and midpoint, detects bullish or bearish breaks, builds a retest shelf around the broken boundary, scores the break from 0 to 100, and summarizes the current state inside a compact AG Pro panel.
It does not predict price direction, automate trades, or provide guaranteed signals. It is designed to organize weekly range context, break quality, retest behavior, target room, and invalidation risk into a clean visual workflow.
🎯 Purpose & Design Philosophy
Weekly highs and weekly lows are widely watched reference points, but not every break beyond them is meaningful.
This script was built for traders who want to separate a clean weekly range break from a weak expansion, failed breakout, or noisy return back into the prior range.
The design supports structured observation: range first, break quality second, retest behavior third, and action state last.
⚡ Why This Script Is Different
Most tools mark weekly highs and lows or show simple breakout signals.
This script does NOT stop at drawing weekly levels.
Instead, it evaluates what happens after price breaks the range: whether the break has enough close quality, whether the retest shelf is respected, whether target room remains, and whether the context is still valid.
⚙️ Methodology
1. Previous Weekly Range Mapping
2. Break Boundary Detection
3. Retest Shelf Construction
4. Break Quality Scoring
5. Target Room Evaluation
6. Invalidation And Expiration Handling
7. Panel And Alert Output
🗺️ How to Read the Chart
The weekly range box marks the previous week's high-low structure.
The high and low rails show the main break boundaries.
The midpoint line helps users understand where price is relative to the prior weekly balance.
The retest shelf appears around the broken boundary after a weekly range break.
READY BREAK labels appear when the break context meets the required score threshold.
Target rails show projected continuation references after a qualified break.
The panel summarizes Range State, Break Score, Retest, Room, and Action.
🚦 Signals & States
• READY → A qualified weekly range break has formed.
• MONITOR → Price has broken a weekly boundary and the script is evaluating quality.
• WAIT → The previous weekly range is valid, but no active break context is present.
• INVALIDATED → Price failed back inside the weekly range after a break.
• EXPIRED → The break window closed without a qualified context.
• BLOCKED → The previous weekly range is not suitable for evaluation.
🔔 Alerts Logic
Bullish Weekly Range Break Ready triggers when price breaks above the previous weekly high with enough quality.
Bearish Weekly Range Break Ready triggers when price breaks below the previous weekly low with enough quality.
Weekly Range Break Invalidated triggers when price fails back inside the prior weekly range after a break.
Weekly Range Break Expired triggers when the evaluation window closes without a qualified break state.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The break score combines weekly range fit, close distance beyond the boundary, retest shelf behavior, time quality, relative volume, and available target room.
When these elements align, the context becomes stronger.
When they do not align, the script remains in WAIT, MONITOR, INVALIDATED, EXPIRED, or BLOCKED state.
📊 When to Use
• Weekly high and weekly low break analysis
• Breakout-retest workflows
• Intraday monitoring around prior weekly extremes
• Swing context planning
• Trend continuation after a range expansion
⚠️ When NOT to Use
Avoid relying on this script in extremely low-liquidity markets, very noisy symbols, holiday sessions, or conditions where the previous weekly range is not meaningful.
It should not be used as a standalone decision tool without broader market context, risk planning, and independent confirmation.
🎛️ Key Inputs
• Minimum Weekly Range filters weak or compressed prior weekly ranges.
• Break Buffer ATR controls how far price must close beyond the weekly boundary.
• Retest Shelf ATR controls the depth of the shelf around the broken boundary.
• Invalidation Buffer ATR controls how far price must close back inside the range before invalidation.
• Minimum Ready Score controls how strong the score must be before READY appears.
• Target inputs define continuation reference rails from the broken boundary.
• Visual settings control boxes, rails, labels, right-side tags, panel location, and font size.
🖥️ Interface & Visual Design
The interface is designed to make the weekly range context readable at a glance.
The chart shows the prior weekly range, the active break boundary, the retest shelf, and target-room references without turning the screen into a generic breakout overlay.
The AG Pro panel gives compact decision context while preserving chart visibility.
🧪 Practical Usage Workflow
1. Check whether the previous weekly range is valid.
2. Watch for a close beyond the weekly high or low.
3. Observe the retest shelf around the broken boundary.
4. Read the break score, retest state, and room value.
5. Treat READY as an attention state and confirm with broader market context.
🔍 Interpretation Guidelines
A higher break score means the weekly range break is cleaner according to the script logic.
A clean retest shelf response can strengthen the context.
Low remaining room means the move may already be extended relative to the projected target.
READY means the context deserves attention, not that price must continue.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an auto-trading system.
It does not provide guaranteed signals.
It does not replace risk management or independent analysis.
⚠️ Limitations & Transparency
Weekly range behavior changes across markets, timeframes, volatility regimes, and liquidity conditions.
The score is rule-based and depends on current chart timeframe, ATR normalization, volume behavior, and the previous weekly range.
Different symbols may require different sensitivity settings.
🧠 Market Context Notes
Weekly range breaks can be more meaningful when aligned with trend, liquidity response, volume participation, and clean retest behavior.
Breaks that quickly return inside the prior weekly range often need extra caution.
🔐 Non-Promise Statement
No script can guarantee future price behavior.
This tool provides structured visual context only.
📉 Risk Disclosure
Trading involves risk.
Users remain responsible for their own decisions.
This script is for educational and analytical purposes only and does not provide financial advice or guaranteed trading outcomes.
Release Notes
UPDATE NOTES - V1.3This update focuses on right-side tag separation, screenshot readability, and final visual polish.
The core purpose of the script remains unchanged.
This release improves how the existing 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
------------------------
• Added Right Tag Minimum Gap ATR
Right-side labels now use an ATR-based minimum vertical gap to reduce overlap between nearby tags such as W Low and T2.
• Improved target tag placement
T1 and T2 tags receive small horizontal offsets and collision-aware vertical placement when they sit too close to range boundary tags.
• Preserved V1.2 label-density improvements
Event Label Cooldown and the reduced default historical label count remain unchanged.
• Preserved the original weekly range break engine
No changes were made to range detection, break scoring, retest logic, READY logic, invalidation, expiration, target rails, or alerts.
------------------------
Visual Improvements
------------------------
• Reduced right-edge tag collisions on 1D and 4H screenshots.
• Improved readability when target rails sit close to weekly high or weekly low tags.
• Kept the centered weekly range badge, retest shelf, target rails, and AGPro panel visual identity intact.
• Maintained the single merged blue panel header row.
------------------------
Interface & Usability
------------------------
• Added Right Tag Minimum Gap ATR for fine control of right-side tag separation.
• Existing controls for centered range label placement, right-side tag offset, event label cooldown, panel location, panel theme, panel font size, and label font size remain unchanged.
------------------------
Behavior Notes
------------------------
This update does not change the core analytical logic of the script.
The goal is to improve clarity and usability, not to introduce new predictive behavior.
Users should interpret outputs the same way as before, but with cleaner right-side tag placement.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Weekly range behavior may differ across symbols, liquidity conditions, volatility regimes, and intraday timeframes.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Public-free and invite-only TradingView Pine Script tools for market analysis, risk planning, liquidity and execution review.
Script library & access: aligurtuna.com/agprolabs-pine-scriptleri/
Telegram: t.me/agprolabs
Script library & access: aligurtuna.com/agprolabs-pine-scriptleri/
Telegram: t.me/agprolabs
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Public-free and invite-only TradingView Pine Script tools for market analysis, risk planning, liquidity and execution review.
Script library & access: aligurtuna.com/agprolabs-pine-scriptleri/
Telegram: t.me/agprolabs
Script library & access: aligurtuna.com/agprolabs-pine-scriptleri/
Telegram: t.me/agprolabs
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.