OPEN-SOURCE SCRIPT
Telah dikemas kini

Post-Breakout Risk Ladder [AGPro Series]

890
Post-Breakout Risk Ladder [AGPro Series]

🧠 Core Idea

After a breakout happens, is the move still offering clean target room or is pullback risk taking control?


📌 Overview / What it does

Post-Breakout Risk Ladder [AGPro Series] maps a breakout base, locks the breakout edge, and converts the post-breakout move into a structured R-based risk ladder.

The script displays a breakout base, pullback risk shelf, entry rail, invalidation rail, 1R / 2R / 3R target rails, target defense labels, pullback test labels, and a compact AG Pro dashboard.

It does not predict that a breakout will continue. It helps organize what happens after a breakout: current R, pullback risk, target room, invalidation, and action state.


🎯 Purpose & Design Philosophy

Many breakout tools focus only on the breakout candle.

This script was built for the part that comes next: the risk management phase after the breakout is already visible.

It helps traders read whether the breakout is still structured, whether the pullback is healthy, whether the next target has room, and whether the breakout context has failed.


⚡ Why This Script Is Different

Most breakout indicators highlight the break itself.

This script does NOT treat the breakout as the end of the analysis.

Instead, it builds a post-breakout planning map with a base, entry reference, invalidation shelf, R ladder, pullback risk score, target room, and target defense context.


⚙️ Methodology

1. Breakout Base Detection

The script defines a recent base using completed bars and checks whether price closes beyond the base edge with enough displacement quality.

2. Breakout Lock

When the breakout qualifies, the script locks the base high/low, breakout edge, entry reference, and invalidation edge.

3. Risk Ladder Mapping

Risk is standardized into R units from the breakout entry to invalidation. Target rails are projected as 1R, 2R, and 3R references.

4. Pullback and Defense Evaluation

The script tracks pullback tests into the breakout shelf, current R, target room, and target defense behavior.


🗺️ How to Read the Chart

The breakout base shows the structure that price broke from.

The pullback shelf marks the zone where a retest may remain constructive or become risky.

The entry rail and invalidation rail define the R unit.

The 1R, 2R, and 3R rails show post-breakout target references.

Labels highlight breakout locks, pullback tests, target defense, and invalidation.

The panel summarizes:
• Breakout state
• Current R
• Pullback risk
• Target room
• Action state


🚦 Signals & States

• Bull Breakout → price closed above the breakout base with acceptable quality

• Bear Breakout → price closed below the breakout base with acceptable quality

• Pullback Test → price is testing the post-breakout shelf

• Target Defense → price has reached or interacted with an R target rail

• Invalidated → price lost the active breakout structure

• Expired → the breakout ladder is too old to remain active


🔔 Alerts Logic

Alerts can trigger when a breakout ladder is locked, when the breakout context is READY, when price tests the pullback shelf, when the ladder invalidates, or when target defense appears.

Alerts are attention markers only. They are not trade instructions.


🧩 Confluence Logic

The breakout context becomes stronger when base quality, breakout body strength, relative volume, pullback shelf behavior, and target room align.

The R ladder helps separate structured continuation from late or overextended movement.


📊 When to Use

• After clear range breaks

• During breakout retests

• In trending markets with continuation attempts

• When evaluating post-breakout risk-to-room structure

• On liquid symbols with readable candles and volume


⚠️ When NOT to Use

• Very low-liquidity markets

• Extremely noisy sideways ranges

• Random spike candles without structure

• News candles with unstable spreads

• When no meaningful base exists before the breakout


🎛️ Key Inputs

• Base Lookback Bars → controls how the breakout base is detected

• Break Buffer ATR → controls how far beyond the base price must close

• Minimum Break Body Ratio → filters weak wick-only breaks

• Minimum Relative Volume → filters low-participation breaks

• Retest Shelf ATR → controls the pullback shelf around the broken edge

• Invalidation Buffer ATR → controls where the ladder fails

• Target R Settings → control the 1R / 2R / 3R ladder rails


🖥️ Interface & Visual Design

The visual hierarchy is designed around post-breakout planning.

The base defines context, the shelf defines pullback risk, the rails define R structure, and the panel provides a quick state read.

The goal is to keep the chart useful, structured, and premium without turning it into a cluttered signal board.


🧪 Practical Usage Workflow

1. Check whether a breakout ladder is active

2. Read current R in the panel

3. Inspect the pullback shelf

4. Compare target room with pullback risk

5. Watch invalidation and target defense labels


🔍 Interpretation Guidelines

A READY state means the breakout ladder has enough structure to monitor.

Current R helps measure how far price has moved from the breakout reference.

Pullback risk helps evaluate whether price is still respecting the breakout shelf.

Target room helps avoid treating late moves the same as early moves.


🚫 What This Script Is NOT

This script is not a prediction engine.

It is not a guaranteed breakout system.

It is not an automated trading tool.

It does not provide financial advice.

It does not guarantee continuation, reversal, targets, or profit.


⚠️ Limitations & Transparency

Breakout quality depends on market structure, volatility, liquidity, and timeframe.

Some breakouts may fail quickly.

Some slow breakouts may not trigger if candle quality or volume is too weak.

R levels are planning references, not guaranteed destinations.


🧠 Market Context Notes

Breakouts are often strongest when structure, participation, and follow-through align.

A breakout with clean target room and controlled pullback risk is different from a late breakout already pressing into extension.

Use the ladder as context, not certainty.


🧾 Use Case Examples

When price breaks above a recent base, the script locks the breakout edge and projects 1R / 2R / 3R references.

If price later pulls back into the shelf, the script marks pullback risk so the user can evaluate whether the structure remains intact.

If price reaches a target rail, target defense labels help identify where the move may need confirmation.


🧱 System Philosophy

AGPro Series tools are built as decision-support engines.

The purpose is to organize market behavior into structure, score, state, and risk context rather than providing blind buy or sell calls.


🔐 Non-Promise Statement

No breakout is certain.

No target rail is guaranteed.

No script can remove risk.


📉 Risk Disclosure

Trading involves risk.

Users are responsible for their own analysis, decisions, risk management, and execution.

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


📚 Educational Note

Use this tool to study how breakout bases, retests, invalidation, current R, and target room interact across different markets and timeframes.
Nota Keluaran
🔧 UPDATE NOTES - 1.1

This update focuses on visual hierarchy, label consistency, chart readability, and panel usability.

The core purpose of the script remains unchanged.
This release improves how the existing post-breakout risk ladder 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
------------------------

• Version header cleanup
Corrected the script header version line and updated the release to Version 1.1.

• Centered badge system
Moved breakout base and pullback shelf text into separate centered badges instead of embedding text directly into boxes.

• Unified label sizing
All chart labels, centered badges, and right-side tags now follow the Label Font Size input.

• Reduced default label crowding
Adjusted default label behavior by increasing cooldown, reducing retained label count, and disabling pullback-test labels by default.

• Adaptive projection control
Added an adaptive higher-timeframe projection option so projected boxes and rails stay visually balanced.

• Panel control refresh
Expanded panel locations, added Elite Dark / Slate / Clean Light themes, added Huge font-size support, and improved live panel-position handling.

• Right-side tag cleanup
Shortened right-side tag text for entry, invalidation, and R rails to reduce chart-edge congestion.


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

• Improved chart readability by separating badge text from visual zones.

• Reduced visual clutter around the breakout base and pullback shelf.

• Refined visual hierarchy between base, shelf, risk corridor, invalidation line, and R rails.

• Adjusted default projection and label spacing for a cleaner publication screenshot.


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

• Optimized panel layout for clearer information flow.

• Improved label readability for better chart interaction.

• Added broader panel location and theme choices.

• Enhanced overall user experience without changing core logic.


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

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

The breakout base detection, risk unit, R rails, pullback shelf, invalidation logic, target defense events, and alerts remain conceptually consistent with the prior release.

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 improved visual structure.


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, timeframe differences, and breakout quality may affect how ladders and retest shelves 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.
Nota Keluaran
🔧 UPDATE NOTES - 1.2

This update focuses on readability, decision support, and clean rail tags.

The core purpose of the script remains unchanged.
This release improves how the existing breakout-ladder logic is presented and
interpreted on the chart, and adds a stop-aware reference statistic that uses the
script's own target and invalidation levels.

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 1R Hit Rate to the panel
A new statistic tracks how many past locked breakouts reached their 1R target before
returning to the script's own invalidation level. Both levels are frozen at the lock
bar, samples are evaluated only on confirmed bars, and a breakout that reaches neither
side within the window times out without counting. The panel shows "Building (n)"
until enough samples exist, then a tier-colored percentage with the sample count.

• Improved on-chart text contrast
The breakout, invalidation, and target-defense labels, the base and shelf badges, and
all right-side rail tags now use a luminance-aware text color, so text stays sharp on
bright green, pink, and gold fills instead of washing out.

• Cleaner right-side rail tags
When the Entry, Invalid, and R rails crowd together on tight ranges, their tags are
now nudged apart vertically so each stays readable. The price shown in each tag is
unchanged.

• Hardened volatility reference
The ATR fallback resolves to true range on the very first bars, keeping spacing stable
on freshly loaded or low-history symbols.


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

• Improved chart readability by recoloring all label, badge, and tag text for contrast

• Reduced visual clutter by de-collising crowded right-side rail tags

• Refined the panel hierarchy so the 1R Hit Rate sits above the Action read

• Kept the base, shelf, corridor, and rail positioning intact


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

• Optimized panel layout to pair quality and risk reads with a follow-through statistic

• Improved label readability for clearer first-glance interpretation

• Adjusted text colors for a more balanced premium appearance

• Enhanced overall user experience without changing core logic


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

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

The 1R Hit Rate is a descriptive, backward-looking statistic. It is not a prediction
and does not guarantee that any future breakout will reach its target.

Users should interpret outputs the same way as before, but with improved visual
structure and an added follow-through reference.


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, and timeframe differences may affect
how breakouts and the 1R Hit 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.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.