OPEN-SOURCE SCRIPT
Updated Breakout Participation Gate [AGPro Series]

Breakout Participation Gate [AGPro Series]
🧠 Core Idea
Does the breakout have enough participation and structure to deserve attention?
📌 Overview / What it does
Breakout Participation Gate is a breakout validation tool built to separate structured breakouts from weak breaks and fakeout-prone moves.
The script builds upper and lower breakout gate levels from recent structure, evaluates breakout candle quality, checks relative volume, body commitment, close location, trend context, retest behavior, expansion potential, and fakeout risk.
It does not predict price direction, automate trades, or claim that a gate-open event must continue. It is a structured visualization and decision-support tool for breakout participation review.

🎯 Purpose & Design Philosophy
Breakouts are among the most searched and most misunderstood market events.
Many tools mark every move above resistance or below support.
This script was built to ask a stricter question:
Did the breakout pass the participation gate?
The design goal is to help traders avoid treating every structural break as equally meaningful.
⚡ Why This Script Is Different
Most breakout tools focus on the break itself.
This script does NOT mark every breakout as valid.
Instead, it checks whether the breakout had enough relative volume, body commitment, close location, range expansion, trend context, and retest behavior. It also keeps the active gate visible so users can watch whether the breakout holds, expands, or fails back inside the structure.
⚙️ Methodology
1. Context Detection
The script identifies recent upper and lower gate levels using a structure lookback.
2. Breakout Qualification
When price closes beyond a gate, the script scores participation through volume, candle body, close location, range expansion, and trend context.
3. Gate Classification
High-quality breakouts can become GATE OPEN events. Lower-quality breaks can be classified as WEAK BREAK.
4. Retest Evaluation
After a gate opens, the script projects a retest shelf and watches whether price defends the shelf.
5. Fakeout and Expansion Review
The script tracks whether price closes back inside the gate shelf or expands beyond the active gate with acceptable participation.
6. Visual Output
The chart displays breakout gate lines, retest shelf, event labels, right-side tags, alerts, and a compact AG Pro panel.
🗺️ How to Read the Chart
Upper Gate = recent upper structure level that price must break to start an upside gate evaluation.
Lower Gate = recent lower structure level that price must break to start a downside gate evaluation.
Breakout Retest Shelf = the active zone around the gate where retest behavior is evaluated.
GATE OPEN = breakout passed the participation gate.
WEAK BREAK = price broke the gate but participation quality was not strong enough.
RETEST HOLD = price defended the active retest shelf after the breakout.
FAKEOUT RISK = price closed back inside the gate shelf after the breakout.
EXPANSION READY = price expanded beyond the gate while participation remained acceptable.
Panel = summarizes gate status, quality score, direction, relative volume, body commitment, retest health, fakeout risk, and next context.
🚦 Signals & States
• GATE OPEN → breakout passed the participation gate.
• WEAK BREAK → price broke structure but did not show enough participation quality.
• GATE WATCH → active gate is being monitored after a breakout.
• RETEST HOLD → active retest shelf was defended.
• FAKEOUT RISK → price closed back through the gate shelf.
• EXPANSION READY → price expanded beyond the gate with acceptable participation.
• WAIT BREAKOUT → no active gate has been triggered.
🔔 Alerts Logic
Alerts trigger when a major breakout-gate state appears.
• Breakout Gate Open → breakout passed the participation gate.
• Weak Breakout → price broke a gate level without enough participation quality.
• Breakout Retest Hold → active retest shelf was defended.
• Breakout Fakeout Risk → price closed back inside the gate shelf after the breakout.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The context becomes stronger when:
• Price closes beyond a defined structure gate
• Relative volume is above normal
• Candle body commitment is strong
• Close location supports the breakout direction
• Range expands versus ATR
• The breakout direction agrees with trend context
• Retest behavior respects the active gate shelf
When these elements do not align, the script avoids treating the breakout as automatically valid.
📊 When to Use
• Breakout validation
• Failed breakout review
• Retest planning
• Trend continuation review
• Crypto, stocks, futures, forex, and liquid markets
• 15m, 30m, 1H, 4H, and 1D charts
⚠️ When NOT to Use
• Very low-liquidity assets
• Extremely noisy micro timeframes
• Symbols with unreliable volume
• News-driven spikes where structure can be distorted
• Markets where every wick break is being over-interpreted
• Situations where a single breakout label is expected to act as a guaranteed signal
🎛️ Key Inputs
• Gate Structure Lookback → defines the recent structure window used for upper and lower gates.
• Breakout Close Buffer ATR → controls how far beyond the gate price must close.
• Minimum Breakout Relative Volume → defines how much participation is required for strong volume credit.
• Minimum Body Commitment % → controls how much candle body participation is required.
• Gate Quality Threshold → separates gate-open breakouts from weak breaks.
• Retest Evaluation Window → defines how long the active gate shelf remains under review.
• Retest Shelf Width ATR → controls the thickness of the retest shelf around the active gate.
• Expansion Ready Distance ATR → defines when a breakout has expanded far enough to be monitored as continuation-ready.
• Event Label Mode → Premium focuses on higher-quality gate states. Detailed allows more weak-break labels.
🖥️ Interface & Visual Design
The visual hierarchy is built around the gate:
Gate lines define the structure.
The retest shelf shows where the breakout should hold.
Event labels mark gate-open, weak-break, retest-hold, fakeout-risk, and expansion-ready states.
Right-side tags keep the active gate context visible.
The AG Pro panel compresses the current breakout context into a fast, readable summary.
🧪 Practical Usage Workflow
1. Read the panel gate status.
2. Check whether price has broken the upper or lower gate.
3. Compare quality score with the event label.
4. Watch the active retest shelf.
5. Check whether price holds, expands, or fails back inside the gate.
6. Confirm with broader market structure, liquidity, volume, and risk planning.
🔍 Interpretation Guidelines
A gate-open label does not guarantee continuation.
A weak-break label does not guarantee reversal.
A retest-hold label means the active shelf was defended according to the script's rules.
A fakeout-risk label means the breakout structure weakened.
The script is best used as a breakout-quality layer, not as a standalone trading system.
🚫 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 entry or exit signals.
It is not a simple support/resistance breakout marker.
⚠️ Limitations & Transparency
Breakout quality depends on market structure and liquidity.
Volume behavior can differ across crypto, futures, stocks, and forex.
Choppy ranges can create repeated weak-break and fakeout states.
Different timeframes may show different gate behavior.
Highly volatile news events can distort breakout quality.
🧠 Market Context Notes
Breakouts are strongest when structure, candle commitment, participation, and retest behavior align.
The first break is only one part of the story.
The active gate shelf helps users watch whether the market accepts the breakout after the first impulse.
🧾 Use Case Examples
If price closes above the upper gate with strong participation, the script may mark GATE OPEN.
If price breaks a gate but quality is weak, the script may mark WEAK BREAK.
If price returns to the active shelf and defends it, the script may mark RETEST HOLD.
If price closes back through the shelf, the script may mark FAKEOUT RISK.
🧱 System Philosophy
The goal is not to chase every breakout.
The goal is to filter breakout attention.
This script treats breakout quality as a sequence:
structure break → participation gate → retest shelf → expansion or failure.
🔐 Non-Promise Statement
No breakout label guarantees continuation.
No weak-break label guarantees reversal.
No retest label guarantees a successful trend move.
All outputs should be interpreted as analytical context.
📉 Risk Disclosure
Trading involves risk.
This script is for educational and analytical purposes only.
It does not provide financial advice, investment advice, or guaranteed trading outcomes.
Users are fully responsible for their own decisions, risk management, and trade execution.
📚 Educational Note
Use the script to study which breakouts attract real participation and which breaks fail to hold their gate.
The most useful question is not only whether price broke structure.
The better question is whether the breakout deserved attention after the break.
🧠 Core Idea
Does the breakout have enough participation and structure to deserve attention?
📌 Overview / What it does
Breakout Participation Gate is a breakout validation tool built to separate structured breakouts from weak breaks and fakeout-prone moves.
The script builds upper and lower breakout gate levels from recent structure, evaluates breakout candle quality, checks relative volume, body commitment, close location, trend context, retest behavior, expansion potential, and fakeout risk.
It does not predict price direction, automate trades, or claim that a gate-open event must continue. It is a structured visualization and decision-support tool for breakout participation review.
🎯 Purpose & Design Philosophy
Breakouts are among the most searched and most misunderstood market events.
Many tools mark every move above resistance or below support.
This script was built to ask a stricter question:
Did the breakout pass the participation gate?
The design goal is to help traders avoid treating every structural break as equally meaningful.
⚡ Why This Script Is Different
Most breakout tools focus on the break itself.
This script does NOT mark every breakout as valid.
Instead, it checks whether the breakout had enough relative volume, body commitment, close location, range expansion, trend context, and retest behavior. It also keeps the active gate visible so users can watch whether the breakout holds, expands, or fails back inside the structure.
⚙️ Methodology
1. Context Detection
The script identifies recent upper and lower gate levels using a structure lookback.
2. Breakout Qualification
When price closes beyond a gate, the script scores participation through volume, candle body, close location, range expansion, and trend context.
3. Gate Classification
High-quality breakouts can become GATE OPEN events. Lower-quality breaks can be classified as WEAK BREAK.
4. Retest Evaluation
After a gate opens, the script projects a retest shelf and watches whether price defends the shelf.
5. Fakeout and Expansion Review
The script tracks whether price closes back inside the gate shelf or expands beyond the active gate with acceptable participation.
6. Visual Output
The chart displays breakout gate lines, retest shelf, event labels, right-side tags, alerts, and a compact AG Pro panel.
🗺️ How to Read the Chart
Upper Gate = recent upper structure level that price must break to start an upside gate evaluation.
Lower Gate = recent lower structure level that price must break to start a downside gate evaluation.
Breakout Retest Shelf = the active zone around the gate where retest behavior is evaluated.
GATE OPEN = breakout passed the participation gate.
WEAK BREAK = price broke the gate but participation quality was not strong enough.
RETEST HOLD = price defended the active retest shelf after the breakout.
FAKEOUT RISK = price closed back inside the gate shelf after the breakout.
EXPANSION READY = price expanded beyond the gate while participation remained acceptable.
Panel = summarizes gate status, quality score, direction, relative volume, body commitment, retest health, fakeout risk, and next context.
🚦 Signals & States
• GATE OPEN → breakout passed the participation gate.
• WEAK BREAK → price broke structure but did not show enough participation quality.
• GATE WATCH → active gate is being monitored after a breakout.
• RETEST HOLD → active retest shelf was defended.
• FAKEOUT RISK → price closed back through the gate shelf.
• EXPANSION READY → price expanded beyond the gate with acceptable participation.
• WAIT BREAKOUT → no active gate has been triggered.
🔔 Alerts Logic
Alerts trigger when a major breakout-gate state appears.
• Breakout Gate Open → breakout passed the participation gate.
• Weak Breakout → price broke a gate level without enough participation quality.
• Breakout Retest Hold → active retest shelf was defended.
• Breakout Fakeout Risk → price closed back inside the gate shelf after the breakout.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The context becomes stronger when:
• Price closes beyond a defined structure gate
• Relative volume is above normal
• Candle body commitment is strong
• Close location supports the breakout direction
• Range expands versus ATR
• The breakout direction agrees with trend context
• Retest behavior respects the active gate shelf
When these elements do not align, the script avoids treating the breakout as automatically valid.
📊 When to Use
• Breakout validation
• Failed breakout review
• Retest planning
• Trend continuation review
• Crypto, stocks, futures, forex, and liquid markets
• 15m, 30m, 1H, 4H, and 1D charts
⚠️ When NOT to Use
• Very low-liquidity assets
• Extremely noisy micro timeframes
• Symbols with unreliable volume
• News-driven spikes where structure can be distorted
• Markets where every wick break is being over-interpreted
• Situations where a single breakout label is expected to act as a guaranteed signal
🎛️ Key Inputs
• Gate Structure Lookback → defines the recent structure window used for upper and lower gates.
• Breakout Close Buffer ATR → controls how far beyond the gate price must close.
• Minimum Breakout Relative Volume → defines how much participation is required for strong volume credit.
• Minimum Body Commitment % → controls how much candle body participation is required.
• Gate Quality Threshold → separates gate-open breakouts from weak breaks.
• Retest Evaluation Window → defines how long the active gate shelf remains under review.
• Retest Shelf Width ATR → controls the thickness of the retest shelf around the active gate.
• Expansion Ready Distance ATR → defines when a breakout has expanded far enough to be monitored as continuation-ready.
• Event Label Mode → Premium focuses on higher-quality gate states. Detailed allows more weak-break labels.
🖥️ Interface & Visual Design
The visual hierarchy is built around the gate:
Gate lines define the structure.
The retest shelf shows where the breakout should hold.
Event labels mark gate-open, weak-break, retest-hold, fakeout-risk, and expansion-ready states.
Right-side tags keep the active gate context visible.
The AG Pro panel compresses the current breakout context into a fast, readable summary.
🧪 Practical Usage Workflow
1. Read the panel gate status.
2. Check whether price has broken the upper or lower gate.
3. Compare quality score with the event label.
4. Watch the active retest shelf.
5. Check whether price holds, expands, or fails back inside the gate.
6. Confirm with broader market structure, liquidity, volume, and risk planning.
🔍 Interpretation Guidelines
A gate-open label does not guarantee continuation.
A weak-break label does not guarantee reversal.
A retest-hold label means the active shelf was defended according to the script's rules.
A fakeout-risk label means the breakout structure weakened.
The script is best used as a breakout-quality layer, not as a standalone trading system.
🚫 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 entry or exit signals.
It is not a simple support/resistance breakout marker.
⚠️ Limitations & Transparency
Breakout quality depends on market structure and liquidity.
Volume behavior can differ across crypto, futures, stocks, and forex.
Choppy ranges can create repeated weak-break and fakeout states.
Different timeframes may show different gate behavior.
Highly volatile news events can distort breakout quality.
🧠 Market Context Notes
Breakouts are strongest when structure, candle commitment, participation, and retest behavior align.
The first break is only one part of the story.
The active gate shelf helps users watch whether the market accepts the breakout after the first impulse.
🧾 Use Case Examples
If price closes above the upper gate with strong participation, the script may mark GATE OPEN.
If price breaks a gate but quality is weak, the script may mark WEAK BREAK.
If price returns to the active shelf and defends it, the script may mark RETEST HOLD.
If price closes back through the shelf, the script may mark FAKEOUT RISK.
🧱 System Philosophy
The goal is not to chase every breakout.
The goal is to filter breakout attention.
This script treats breakout quality as a sequence:
structure break → participation gate → retest shelf → expansion or failure.
🔐 Non-Promise Statement
No breakout label guarantees continuation.
No weak-break label guarantees reversal.
No retest label guarantees a successful trend move.
All outputs should be interpreted as analytical context.
📉 Risk Disclosure
Trading involves risk.
This script is for educational and analytical purposes only.
It does not provide financial advice, investment advice, or guaranteed trading outcomes.
Users are fully responsible for their own decisions, risk management, and trade execution.
📚 Educational Note
Use the script to study which breakouts attract real participation and which breaks fail to hold their gate.
The most useful question is not only whether price broke structure.
The better question is whether the breakout deserved attention after the break.
Release Notes
🔧 UPDATE NOTES - V1.1This update focuses on presentation flexibility, readability, and publication polish.
The core purpose of the script remains unchanged.
This release improves how the existing breakout participation 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 expanded panel placement controls
The panel now supports center positions, including Top Center, Middle Center, and Bottom Center.
• Added Slate panel theme
Users can now choose between Dark, Slate, and Light panel themes while preserving the merged AG Pro blue header.
• Added Huge font-size support
Chart labels, right-side tags, and panel text now include a Huge option for presentation screenshots.
• Added Right Tag Detail control
Right-side gate tags can remain compact or show full gate-price detail depending on the chart layout.
• Refined label casing
Event labels and right-side tags now use cleaner publication-style wording while preserving the original signal meanings.
------------------------
Visual Improvements
------------------------
• Improved chart readability by keeping gate labels cleaner and less mechanical
• Reduced visual friction on publication screenshots through compact right-side tag control
• Refined panel theme flexibility for dark, slate, and light chart layouts
• Preserved the original retest shelf, gate rails, and event-label character
------------------------
Interface & Usability
------------------------
• Optimized panel layout flexibility for more chart compositions
• Improved label readability for better chart interaction
• Added more font-size control for labels, tags, and panel text
• Enhanced overall user experience without changing core logic
------------------------
Behavior Notes
------------------------
This update does not change the core analytical logic of the script.
The gate, retest, fakeout, participation, and alert behavior should be interpreted the same way as before.
The goal is to improve clarity and usability, not to introduce new predictive behavior.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, timeframe differences, and volume quality may affect how labels and states 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.
Release Notes
🔧 UPDATE NOTES - v1.3This update focuses on on-chart label contrast and tag placement.
The core purpose of the script remains unchanged. It still studies whether a
breakout has enough structure, body commitment, relative volume and retest
behavior to deserve attention, and grades each breakout with a 0-100 gate
quality score and a clear gate state.
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
------------------------
• Contrast-aware label text
Every on-chart element — event labels (Gate Open, Weak Break, Retest Hold,
Fakeout Risk, Expansion Ready), the retest shelf label, and the right-side
gate / status tags — now derives its text color from its own background
luminance. Previously a fixed light text read faintly on the lighter
backgrounds (amber weak-break, pink fakeout/upper-gate, indigo expansion). All
labels now read crisply.
• Status tag separated from gate tags
The right-side status tag is now offset slightly into the retest shelf instead
of sitting exactly on the active gate level. This prevents it from stacking on
the upper or lower gate tag when the active gate coincides with a current gate
level. Its content is unchanged.
• Shelf label color now updates correctly
When the active gate flips direction, the retest shelf label's text color is
now refreshed alongside its background, keeping it readable in both directions.
• Event labels spaced vertically
Event labels (Gate Open, Weak Break, Retest Hold, Fakeout Risk, Expansion
Ready) now shift vertically when several land near the same bar. The label
cooldown alone left enough bar-spacing, but on compressed or high-timeframe
views those bars occupy very little width, so labels could still overlap
horizontally. They now stack apart cleanly without reducing how many labels are
shown.
------------------------
Visual Improvements
------------------------
• Higher-contrast event labels, shelf label and right-side tags.
• Removed the potential status-tag / gate-tag overlap on the right edge.
• Eliminated event-label stacking on compressed and high-timeframe views.
------------------------
Interface & Usability
------------------------
• The panel (Gate Status, Quality Score, Gate Direction, RelVol / Body, Retest
Health, Fakeout Risk, Next Context) is unchanged; only the header text color
was aligned to the contrast standard.
• The chart short title was aligned to the AG Pro naming standard.
------------------------
Behavior Notes
------------------------
This update does not change any gate-detection, scoring, retest, fakeout,
expansion or alert logic. Only label text color, the vertical position of the
right-side status tag, and the on-chart vertical placement of event labels were
adjusted. Interpretation of all outputs is unchanged.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool. Market conditions such as
volatility, liquidity and timeframe differences may affect how breakouts, gate
states and the quality score 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.
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 scripts + invite-only AGPro workflows for market analysis, liquidity context, risk planning and execution review.
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
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 scripts + invite-only AGPro workflows for market analysis, liquidity context, risk planning and execution review.
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
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.