OPEN-SOURCE SCRIPT
Aggiornato AG Pro Structure Labels [AGPro Series]

AG Pro HH HL LH LL Structure Labels [AGPro Series]
Overview / What it does
AG Pro HH HL LH LL Structure Labels is a clean market-structure reader built to simplify price action without turning the chart into a wall of signals. Its core purpose is straightforward: identify confirmed swing highs and swing lows, classify them as HH, HL, LH, or LL, and connect those points in a visually readable structure path so traders can understand the current sequence of price development at a glance.
Many market structure tools try to do too much at once. They mix structure, signals, zones, pattern scoring, and trade suggestions into a single publication, which can make the chart heavier and the analytical purpose less clear. This script takes the opposite route. It focuses on one job only: making confirmed swing structure easier to read, follow, and interpret in real time as the chart evolves.
That design choice is what gives this script its value. Instead of asking the user to interpret disconnected highs and lows manually, the script builds a visible structure chain from confirmed pivots and labels each important step. The result is a chart that remains visually disciplined while still communicating trend continuation, structural weakening, and flow transitions in a simple and repeatable format.
This script is especially useful for traders who want structure clarity before they bring in any other layer of analysis. It can be used as a standalone structure map, or as a first-pass chart-cleaning tool before applying other concepts such as support and resistance, trend continuation logic, pullback analysis, breakout validation, or discretionary execution rules.
Unique Edge
The unique edge of this script is not that it attempts to predict where price will go next. Its strength is that it organizes confirmed structure in a way that is visually clean, logically consistent, and immediately usable on live charts.
Unlike many AG Pro scripts that are built around event detection, confluence scoring, price-zone visualization, setup quality filtering, or breakout logic, this publication is intentionally narrower and more focused. It is not a BOS/CHoCH event detector. It is not a liquidity-sweep model. It is not an order-block or fair-value-gap engine. It is not a breakout-quality, retest-quality, or pattern-quality scorer. It is also not a fixed reference-level tool such as a prior-day or prior-week high/low mapper. This script is a structure readability tool first and foremost.
That distinction matters.
Previous AG Pro releases often revolve around a specific trading event: a sweep, a break, a retest, a zone reaction, a continuation pattern, or a multi-factor confluence state. This script does not begin from an event. It begins from the swing chain itself. It asks a simpler question: what is the current sequence of confirmed highs and lows, and what does that sequence imply about market flow right now?
Because of that, the script fills a different role in the broader AG Pro library. It is closer to a structural map than a setup engine. It helps answer whether the chart is still printing constructive highs and lows, whether the sequence has started to weaken, or whether the structure is now leaning in the opposite direction. That makes it useful both on its own and as a foundation layer beneath other tools.
Another important differentiator is presentation discipline. The structure path provides continuity between pivots, while the label set communicates classification without unnecessary chart clutter. The compact floating HUD reinforces the current flow state without dominating screen space. Together, these choices make the script visually premium while keeping the chart readable.
Methodology
The script uses a confirmed pivot framework. Swing highs and swing lows are identified using left and right lookback parameters selected by the user. Because pivots require confirmation, labels appear only after the structure point is confirmed by the specified number of bars. This helps reduce noise and keeps the structure map grounded in confirmed rather than speculative swing points.
Once a new pivot high is confirmed, it is compared with the prior confirmed pivot high. If it exceeds the previous confirmed high, it is classified as HH. If it does not, it is classified as LH. The same logic applies on the low side: if a confirmed pivot low is above or equal to the previous confirmed pivot low, it is classified as HL; if it is lower, it is classified as LL.
The script also includes an ATR-based structure filter. This filter is designed to suppress micro-swings that are too small relative to current volatility, which helps maintain visual cleanliness on choppier charts. Instead of drawing every minor fluctuation, the script attempts to keep attention on swings that are more structurally meaningful for the selected sensitivity.
A structure path, shown as a clean zigzag line, connects the confirmed pivots that pass the filter. This gives the user an immediate visual map of the sequence rather than a collection of isolated labels. In practice, this is one of the most useful parts of the script because it turns the market’s swing progression into a readable path.
The floating HUD summarizes the current market-flow bias in a minimalist format. It is not intended to act as a trade signal. Its job is to provide a quick structural read so the user can see whether the recent chain is leaning bullish, bearish, or transitional according to the internal swing logic.
Signals & Alerts
This script is not designed as a one-click entry engine. Its alerts are structural, not predictive.
The publication includes alerts for newly confirmed HH, HL, LH, and LL prints, which can help users monitor structure development without staring at the chart continuously. It also includes alerts for structure-flow transitions when the internal trend state turns bullish or bearish.
These alerts are best understood as workflow alerts. They tell the user that structure has progressed into a new confirmed condition. They do not guarantee continuation, reversal, breakout success, or trade profitability. Their purpose is to improve awareness of structural change, not to replace independent analysis.
Key Inputs
Pivot sensitivity is controlled through left and right lookback values. Higher values usually produce fewer but more mature structure points, while lower values usually produce a faster and denser structure map.
The ATR filter can be enabled to reduce insignificant swings. This can be particularly helpful on lower timeframes or during periods of uneven, noisy price movement.
Users can also control whether the structure path is drawn and can adjust the visual typography for labels and HUD elements. These inputs allow the script to stay visually flexible across different chart styles and screen densities.
How this script differs from other AG Pro scripts
This distinction is central to the publication.
Many AG Pro scripts are built to evaluate the quality of a setup. They may score breakouts, retests, continuation patterns, reversal candles, pressure conditions, or confluence states. Others are built around zones and reactions, such as supply-demand mapping, premium-discount logic, fair value gaps, order blocks, or support-resistance behavior. Others focus on structural events such as BOS/CHoCH changes, liquidity sweeps, inducement traps, or session-specific reactions.
This script does none of those things.
It does not measure the quality of a signal.
It does not score a setup.
It does not project targets.
It does not identify fixed daily or weekly reference levels.
It does not try to map every institutional concept on the chart.
It does not attempt to be an all-in-one decision engine.
Instead, it provides a cleaner foundation: confirmed HH, HL, LH, and LL sequencing with a filtered structural path and a compact market-flow summary.
That is precisely why it is different from the previous AG Pro script as well. If the previous release was anchored to fixed price levels, event detection, or context-specific reactions, this script is anchored to swing continuity. If another AG Pro script answers where price reacted, where a sweep occurred, whether a breakout was strong, or whether a setup deserves a quality score, this one answers a more basic but highly important question: what is the confirmed structure chain doing right now?
In that sense, this script is less about trading events and more about structural readability.
Limitations & Transparency
This script uses confirmed pivots, which means it is not attempting to label unconfirmed structure in advance. As a result, there is an intentional delay equal to the confirmation logic chosen by the user. That delay is not a flaw; it is part of the design tradeoff required to avoid premature structure labels.
Like any pivot-based structure tool, output will vary depending on sensitivity settings, timeframe, market volatility, and symbol behavior. A lower sensitivity may reveal more swing detail but can also make the map denser. A higher sensitivity may create a cleaner structure path but may respond more slowly to local shifts.
The ATR filter is a visual-cleanliness tool, not a universal truth engine. It can help reduce noise, but different traders may prefer different levels of structural compression depending on how aggressively or conservatively they define meaningful swings.
This script should also not be interpreted as a complete trading plan. It does not include position sizing, stop placement, target selection, execution logic, or market-specific risk rules. Users should combine it with their own framework, testing process, and judgment.
Risk Disclosure
This script is for analytical and educational use. It is not financial advice, investment advice, or a recommendation to buy or sell any instrument.
Market structure is an interpretive framework, not a guarantee of future price behavior. A bullish sequence can fail, a bearish sequence can reverse, and a clean structural print can still occur inside a broader context that changes the meaning of the move.
Always use independent judgment, apply appropriate risk management, and evaluate the script in the context of your own market, timeframe, and process.
Summary
AG Pro HH HL LH LL Structure Labels is built for traders who value structural clarity over indicator overload. Its role in the AG Pro catalog is distinct: it is not an event hunter, not a zone engine, and not a quality scorer. It is a clean structure reader designed to make confirmed swing progression easier to see, easier to follow, and easier to integrate into a disciplined chart workflow.
If your goal is to understand whether price is still producing constructive highs and lows, whether that chain is weakening, or whether the flow has shifted into a different structural condition, this script is designed for exactly that task.
Overview / What it does
AG Pro HH HL LH LL Structure Labels is a clean market-structure reader built to simplify price action without turning the chart into a wall of signals. Its core purpose is straightforward: identify confirmed swing highs and swing lows, classify them as HH, HL, LH, or LL, and connect those points in a visually readable structure path so traders can understand the current sequence of price development at a glance.
Many market structure tools try to do too much at once. They mix structure, signals, zones, pattern scoring, and trade suggestions into a single publication, which can make the chart heavier and the analytical purpose less clear. This script takes the opposite route. It focuses on one job only: making confirmed swing structure easier to read, follow, and interpret in real time as the chart evolves.
That design choice is what gives this script its value. Instead of asking the user to interpret disconnected highs and lows manually, the script builds a visible structure chain from confirmed pivots and labels each important step. The result is a chart that remains visually disciplined while still communicating trend continuation, structural weakening, and flow transitions in a simple and repeatable format.
This script is especially useful for traders who want structure clarity before they bring in any other layer of analysis. It can be used as a standalone structure map, or as a first-pass chart-cleaning tool before applying other concepts such as support and resistance, trend continuation logic, pullback analysis, breakout validation, or discretionary execution rules.
Unique Edge
The unique edge of this script is not that it attempts to predict where price will go next. Its strength is that it organizes confirmed structure in a way that is visually clean, logically consistent, and immediately usable on live charts.
Unlike many AG Pro scripts that are built around event detection, confluence scoring, price-zone visualization, setup quality filtering, or breakout logic, this publication is intentionally narrower and more focused. It is not a BOS/CHoCH event detector. It is not a liquidity-sweep model. It is not an order-block or fair-value-gap engine. It is not a breakout-quality, retest-quality, or pattern-quality scorer. It is also not a fixed reference-level tool such as a prior-day or prior-week high/low mapper. This script is a structure readability tool first and foremost.
That distinction matters.
Previous AG Pro releases often revolve around a specific trading event: a sweep, a break, a retest, a zone reaction, a continuation pattern, or a multi-factor confluence state. This script does not begin from an event. It begins from the swing chain itself. It asks a simpler question: what is the current sequence of confirmed highs and lows, and what does that sequence imply about market flow right now?
Because of that, the script fills a different role in the broader AG Pro library. It is closer to a structural map than a setup engine. It helps answer whether the chart is still printing constructive highs and lows, whether the sequence has started to weaken, or whether the structure is now leaning in the opposite direction. That makes it useful both on its own and as a foundation layer beneath other tools.
Another important differentiator is presentation discipline. The structure path provides continuity between pivots, while the label set communicates classification without unnecessary chart clutter. The compact floating HUD reinforces the current flow state without dominating screen space. Together, these choices make the script visually premium while keeping the chart readable.
Methodology
The script uses a confirmed pivot framework. Swing highs and swing lows are identified using left and right lookback parameters selected by the user. Because pivots require confirmation, labels appear only after the structure point is confirmed by the specified number of bars. This helps reduce noise and keeps the structure map grounded in confirmed rather than speculative swing points.
Once a new pivot high is confirmed, it is compared with the prior confirmed pivot high. If it exceeds the previous confirmed high, it is classified as HH. If it does not, it is classified as LH. The same logic applies on the low side: if a confirmed pivot low is above or equal to the previous confirmed pivot low, it is classified as HL; if it is lower, it is classified as LL.
The script also includes an ATR-based structure filter. This filter is designed to suppress micro-swings that are too small relative to current volatility, which helps maintain visual cleanliness on choppier charts. Instead of drawing every minor fluctuation, the script attempts to keep attention on swings that are more structurally meaningful for the selected sensitivity.
A structure path, shown as a clean zigzag line, connects the confirmed pivots that pass the filter. This gives the user an immediate visual map of the sequence rather than a collection of isolated labels. In practice, this is one of the most useful parts of the script because it turns the market’s swing progression into a readable path.
The floating HUD summarizes the current market-flow bias in a minimalist format. It is not intended to act as a trade signal. Its job is to provide a quick structural read so the user can see whether the recent chain is leaning bullish, bearish, or transitional according to the internal swing logic.
Signals & Alerts
This script is not designed as a one-click entry engine. Its alerts are structural, not predictive.
The publication includes alerts for newly confirmed HH, HL, LH, and LL prints, which can help users monitor structure development without staring at the chart continuously. It also includes alerts for structure-flow transitions when the internal trend state turns bullish or bearish.
These alerts are best understood as workflow alerts. They tell the user that structure has progressed into a new confirmed condition. They do not guarantee continuation, reversal, breakout success, or trade profitability. Their purpose is to improve awareness of structural change, not to replace independent analysis.
Key Inputs
Pivot sensitivity is controlled through left and right lookback values. Higher values usually produce fewer but more mature structure points, while lower values usually produce a faster and denser structure map.
The ATR filter can be enabled to reduce insignificant swings. This can be particularly helpful on lower timeframes or during periods of uneven, noisy price movement.
Users can also control whether the structure path is drawn and can adjust the visual typography for labels and HUD elements. These inputs allow the script to stay visually flexible across different chart styles and screen densities.
How this script differs from other AG Pro scripts
This distinction is central to the publication.
Many AG Pro scripts are built to evaluate the quality of a setup. They may score breakouts, retests, continuation patterns, reversal candles, pressure conditions, or confluence states. Others are built around zones and reactions, such as supply-demand mapping, premium-discount logic, fair value gaps, order blocks, or support-resistance behavior. Others focus on structural events such as BOS/CHoCH changes, liquidity sweeps, inducement traps, or session-specific reactions.
This script does none of those things.
It does not measure the quality of a signal.
It does not score a setup.
It does not project targets.
It does not identify fixed daily or weekly reference levels.
It does not try to map every institutional concept on the chart.
It does not attempt to be an all-in-one decision engine.
Instead, it provides a cleaner foundation: confirmed HH, HL, LH, and LL sequencing with a filtered structural path and a compact market-flow summary.
That is precisely why it is different from the previous AG Pro script as well. If the previous release was anchored to fixed price levels, event detection, or context-specific reactions, this script is anchored to swing continuity. If another AG Pro script answers where price reacted, where a sweep occurred, whether a breakout was strong, or whether a setup deserves a quality score, this one answers a more basic but highly important question: what is the confirmed structure chain doing right now?
In that sense, this script is less about trading events and more about structural readability.
Limitations & Transparency
This script uses confirmed pivots, which means it is not attempting to label unconfirmed structure in advance. As a result, there is an intentional delay equal to the confirmation logic chosen by the user. That delay is not a flaw; it is part of the design tradeoff required to avoid premature structure labels.
Like any pivot-based structure tool, output will vary depending on sensitivity settings, timeframe, market volatility, and symbol behavior. A lower sensitivity may reveal more swing detail but can also make the map denser. A higher sensitivity may create a cleaner structure path but may respond more slowly to local shifts.
The ATR filter is a visual-cleanliness tool, not a universal truth engine. It can help reduce noise, but different traders may prefer different levels of structural compression depending on how aggressively or conservatively they define meaningful swings.
This script should also not be interpreted as a complete trading plan. It does not include position sizing, stop placement, target selection, execution logic, or market-specific risk rules. Users should combine it with their own framework, testing process, and judgment.
Risk Disclosure
This script is for analytical and educational use. It is not financial advice, investment advice, or a recommendation to buy or sell any instrument.
Market structure is an interpretive framework, not a guarantee of future price behavior. A bullish sequence can fail, a bearish sequence can reverse, and a clean structural print can still occur inside a broader context that changes the meaning of the move.
Always use independent judgment, apply appropriate risk management, and evaluate the script in the context of your own market, timeframe, and process.
Summary
AG Pro HH HL LH LL Structure Labels is built for traders who value structural clarity over indicator overload. Its role in the AG Pro catalog is distinct: it is not an event hunter, not a zone engine, and not a quality scorer. It is a clean structure reader designed to make confirmed swing progression easier to see, easier to follow, and easier to integrate into a disciplined chart workflow.
If your goal is to understand whether price is still producing constructive highs and lows, whether that chain is weakening, or whether the flow has shifted into a different structural condition, this script is designed for exactly that task.
Note di rilascio
Update Notes - V2.0This update rebuilds the script around a cleaner and more disciplined market structure presentation while keeping the core purpose unchanged. The script still focuses on labeling confirmed structural pivots, but the full visual flow, dashboard logic, filtering behavior, and readability have been revised to make the output more stable and easier to interpret on live charts.
What was improved in this update:
• Reworked the structure labeling flow for a cleaner HH / HL / LH / LL sequence.
The pivot engine now produces a more organized structural path so the chart is easier to read during both continuation and transition phases.
• Improved swing filtering for better chart hygiene.
A smarter filtering layer reduces weaker micro-swings and unnecessary structural noise, which helps the labels represent more meaningful pivot information instead of overreacting to minor fluctuations.
• Refined zigzag path behavior.
The structure path now feels more coherent visually and better reflects the sequence of confirmed pivots, improving readability without changing the educational purpose of the script.
• Upgraded the panel to the new AG Pro dashboard format.
The top row now uses the standardized single merged title row with a blue background and a cleaner presentation style consistent with the newer AG Pro visual framework.
• Added a more useful structure summary panel.
The panel now presents quick context for current flow, score, active chain, latest structural print, ATR filter status, and path status, allowing users to review chart state at a glance.
• Improved visual balance of labels and lines.
Label colors, path visibility, spacing, and overall contrast were adjusted to create a cleaner structure map that stays readable without overwhelming the candles.
• Better separation between bullish continuation, bearish continuation, and transitional states.
This makes the script more useful for visual structure tracking instead of showing pivots as isolated labels with limited contextual value.
• Default typography and layout were updated for better usability.
The panel now defaults to a compact small-size presentation, while labels keep a normal-size style for easier reading directly on the chart.
• General cleanup of the code structure.
Internal organization was revised to support a more stable and maintainable build for future updates.
How to read this version:
• HH and HL prints generally indicate constructive upside structure.
• LH and LL prints generally indicate weakening or downside structure.
• Transitional states can appear when the sequence is not yet strong enough to classify as a clearer directional flow.
• The panel is designed as a quick structure summary, not as a trade execution system.
Important transparency notes:
• This script is a structure-reading and chart-annotation tool.
It does not forecast price, guarantee continuation, or replace full trade planning.
• All labels depend on confirmed pivot logic.
Because pivot confirmation requires bars on the right side, signals appear after confirmation rather than at the exact turning point.
• Filtering settings can materially change how many pivots are shown.
Users should adjust sensitivity and filtering inputs according to symbol behavior and timeframe.
• The script is intended for chart analysis and structure interpretation only.
It should be used together with broader context such as trend, volatility, liquidity, and risk management.
Risk disclosure:
This script is provided for educational and analytical use only. It is not financial advice, not a promise of performance, and not an automated trading system. Always validate any chart-based interpretation with your own process and risk controls.
Note di rilascio
Update Notes V2.1This update is designed to give Structure Labels a stronger public-facing edge while keeping the script inside its original identity: clean confirmed HH, HL, LH, and LL structure readability.
What changed in V2.1
- Public title format was updated to the current AGPro standard: the visible script title now removes the leading "AG Pro" prefix while keeping "[AGPro Series]" at the end.
- The AG Pro name remains inside the panel title only, preserving the house style without overloading the public script name.
- The panel was rebuilt with the AGPro blue merged header row. The first row is a single merged row and contains only the panel script name.
- Label and panel font-size controls now default to Normal for stronger readability across common chart layouts.
- Structure labels now use an ATR-based distance from price so HH, HL, LH, and LL tags stay readable instead of getting buried inside candle bodies and wicks.
- A visual cooldown and maximum visible label/path controls were added to keep the chart premium, active, and controlled instead of noisy.
- The same-side refinement logic was tightened so stronger same-side extremes can replace the latest pivot without artificially inflating the structure flow score.
- The optional Structure Hold Pocket layer remains available in settings, but it is disabled by default after visual refinement so the published chart opens with a cleaner premium structure-label look.
- The optional pocket is not a generic support/resistance engine. When enabled, it focuses only on the latest meaningful HL in bullish flow or LH in bearish flow.
- The right-edge pocket tag is also disabled by default to prevent the last structure label area from looking heavy on publication screenshots.
- The panel now reports current Flow, Score, HH/HL or LH/LL Chain, Last Print, label visibility, label mode, ATR filter state, and Path visibility by default.
- Alert conditions remain available for optional Structure Hold Pocket creation, test, and invalidation when that layer is enabled.
Why this update is different
Structure Labels remains a structure readability tool, not a BOS/CHoCH detector, not a liquidity sweep model, not a supply-demand map, and not a full structure range tracker. The update strengthens the original purpose by making the confirmed swing chain easier to follow while keeping the default chart focused on labels and the structure path.
That keeps it separate from other AGPro scripts that focus on breakout quality, reaction zones, supply-demand lifecycles, equal high/equal low sweeps, structural momentum, or full HH/HL/LH/LL trend tracking. The visual emphasis is deliberately restrained: cleaner labels, a stronger panel, controlled density, and an optional pocket layer only for users who want that additional context.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
⚡Precision Pine tools for crypto & FX traders
📊ICT • Smart Money • Market Structure • Liquidity
🧠Rules-based decision tools. No hype. No guesswork
🆕Public-free releases. Continuous updates
⭐Follow AGPro Series for new trading tools
💬t.me/agprolabs
📊ICT • Smart Money • Market Structure • Liquidity
🧠Rules-based decision tools. No hype. No guesswork
🆕Public-free releases. Continuous updates
⭐Follow AGPro Series for new trading tools
💬t.me/agprolabs
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
⚡Precision Pine tools for crypto & FX traders
📊ICT • Smart Money • Market Structure • Liquidity
🧠Rules-based decision tools. No hype. No guesswork
🆕Public-free releases. Continuous updates
⭐Follow AGPro Series for new trading tools
💬t.me/agprolabs
📊ICT • Smart Money • Market Structure • Liquidity
🧠Rules-based decision tools. No hype. No guesswork
🆕Public-free releases. Continuous updates
⭐Follow AGPro Series for new trading tools
💬t.me/agprolabs
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.