OPEN-SOURCE SCRIPT
更新済 AG Pro Supertrend Pullback Quality [AGPro Series]

AG Pro Supertrend Pullback Quality [AGPro Series]
OVERVIEW
AG Pro Supertrend Pullback Quality is an overlay indicator built to evaluate the quality of pullbacks that occur inside an already established Supertrend direction.
This script is not designed as a simple Supertrend flip tool. Instead of focusing on every direction change, it studies whether a pullback into the active Supertrend structure is orderly, controlled, and potentially supportive of trend continuation. The goal is to help users distinguish between clean retracement behavior and weaker pullbacks that may reflect noise, instability, or reduced trend quality.
The indicator combines Supertrend context with a structured quality model. When price interacts with the active trend line and surrounding touch zone, the script evaluates that event using several internal dimensions such as pullback depth, line acceptance, rejection behavior, recovery efficiency, and local noise conditions. The result is summarized into a class-based readout so the chart remains visual and practical.
Because of this design, the script is better understood as a continuation-quality classifier than as a traditional signal generator. It does not attempt to predict every reversal, and it does not assume that all pullbacks within trend are equal. Its main purpose is to organize pullback structure into a clearer analytical framework.
UNIQUE EDGE
The core difference of this script is its emphasis on pullback quality rather than trend flips.
Many Supertrend-based tools are centered around directional transitions. That approach can be useful, but it also tends to compress several different market behaviors into a single yes/no event. In practice, not every trend pullback carries the same structural character. Some are shallow and noisy, some are too deep, and some interact with the trend line in a more orderly way before continuation attempts develop.
AG Pro Supertrend Pullback Quality focuses on that middle layer. It studies what happens after a trend is already active and asks a more specific question: is the current pullback behaving like a controlled retracement, or is it showing weaker continuation quality?
This creates a more workflow-oriented reading model. Instead of using Supertrend only as a directional switch, the script uses it as a live structural reference and grades the quality of pullback interaction around that reference. That makes the tool different from standard flip scripts, entry-only markers, and pure trend state displays.
METHODOLOGY
The script begins with the native Supertrend framework to define active directional context. Once a bullish or bearish state is established, a touch zone is formed around the relevant Supertrend line using ATR-based spacing. This zone is not meant to represent a guaranteed support or resistance region. It is a structured interaction area used to evaluate how price behaves during retracement.
From there, the script evaluates pullback quality through several components:
1) Trend State and Age
A newly flipped trend often behaves differently from a more established one. For that reason, the script includes a stabilization concept and tracks how mature the current trend leg is before weighting pullback quality.
2) Pullback Depth
The retracement is measured relative to ATR and recent price structure. Pullbacks that are too shallow may carry limited informational value, while pullbacks that are too deep may indicate reduced continuation quality. The script scores depth inside a preferred operating range rather than treating all pullbacks equally.
3) Acceptance Relative to the Supertrend Line
A pullback is not evaluated only by whether price touches the zone. The script also checks whether price remains positioned in a way that supports the active trend state. This helps separate cleaner acceptance behavior from weaker interaction.
4) Rejection Character
When price reaches the pullback area, candle behavior matters. The script looks at rejection-style characteristics within the touch and recovery window to estimate whether price is responding constructively to the active trend reference.
5) Recovery Efficiency
After contact with the zone, the script measures whether the market recovers with enough directional efficiency. Fast and orderly recovery behavior is treated differently from hesitant or weak re-expansion.
6) Noise Filter
Frequent directional churn and inefficient travel can reduce the usefulness of pullback classification. The script includes a noise component so that structurally weaker environments do not receive the same quality treatment as cleaner trend conditions.
These components are combined into a final score, which is then mapped into a simple class output. This makes the visual output easier to read without hiding the fact that pullback quality is multi-factor by nature.
QUALITY CLASSES
The final result is summarized into four broad classes:
A-Class
Represents the strongest pullback quality readings among the currently evaluated conditions.
B-Class
Represents constructive pullback quality, but with less strength than the highest tier.
C-Class
Represents acceptable but weaker pullback structure.
Weak
Represents pullback conditions that do not meet the stronger quality profile.
These classes are meant to organize chart behavior, not to forecast a required outcome. They should be interpreted within broader market context, timeframe behavior, and the user’s own process.
CHART ELEMENTS
The script includes several visual layers:
- Supertrend line for directional context
- ATR-based touch zone around the active Supertrend reference
- Pullback quality labels for qualified events
- Compact information panel showing trend state, depth, acceptance, rejection, recovery, noise, and final status
The visual design is intentionally restrained so that price remains readable. The goal is to keep the chart informative without turning the overlay into a dense signal map.
SIGNALS AND ALERTS
The script can generate alerts for the following event types:
- Bullish Pullback Quality Ready
- Bearish Pullback Quality Ready
- Bullish Pullback Confirmed
- Bearish Pullback Confirmed
- Bullish Pullback Invalidated
- Bearish Pullback Invalidated
In general terms, Ready events indicate that the recent pullback has achieved the minimum quality conditions defined by the model. Confirmed events require stronger follow-through logic. Invalidated events help flag cases where a previously qualified pullback context is no longer aligned with the prior state.
These alerts are designed as structured workflow checkpoints rather than standalone instructions.
KEY INPUTS
ATR Length
Controls the ATR foundation used by the Supertrend and zone logic.
Supertrend Factor
Adjusts the spacing and sensitivity of the Supertrend calculation.
Pullback Lookback
Defines the local structure window used during pullback evaluation.
Stabilization Bars After Flip
Helps reduce the weight of very early post-flip behavior.
Recovery Window
Defines how long the script should monitor post-touch recovery behavior.
Touch Zone Size and Max Line Penetration
Control how the script defines valid interaction around the Supertrend line.
Depth Range Inputs
Allow users to define what the script should consider a more optimal pullback depth range.
Ready and Confirmed Score Thresholds
Allow the strictness of class qualification and alert generation to be tuned.
LIMITATIONS AND TRANSPARENCY
This script is an analytical classification tool. It does not know future price action, and it does not guarantee continuation after a qualified pullback.
Like other trend-following frameworks, Supertrend-based structure can become less reliable during choppy or highly unstable market phases. The inclusion of a noise filter helps address that issue, but it does not remove it.
The quality model is also sensitive to volatility, timeframe selection, and the interaction between ATR-based spacing and local structure. A pullback that appears constructive on one timeframe may not behave the same way on another. Users should test settings carefully and interpret results in context.
Labels and classes summarize a model output. They are not a substitute for broader chart reading, risk planning, liquidity awareness, or execution discipline.
RISK DISCLOSURE
This script is provided for technical analysis and chart study only. It does not provide financial, investment, legal, or tax advice.
Trading and investing involve risk. Past behavior, structural classification, and indicator output do not guarantee future results. Users are responsible for their own decisions, testing process, and risk management framework.
OVERVIEW
AG Pro Supertrend Pullback Quality is an overlay indicator built to evaluate the quality of pullbacks that occur inside an already established Supertrend direction.
This script is not designed as a simple Supertrend flip tool. Instead of focusing on every direction change, it studies whether a pullback into the active Supertrend structure is orderly, controlled, and potentially supportive of trend continuation. The goal is to help users distinguish between clean retracement behavior and weaker pullbacks that may reflect noise, instability, or reduced trend quality.
The indicator combines Supertrend context with a structured quality model. When price interacts with the active trend line and surrounding touch zone, the script evaluates that event using several internal dimensions such as pullback depth, line acceptance, rejection behavior, recovery efficiency, and local noise conditions. The result is summarized into a class-based readout so the chart remains visual and practical.
Because of this design, the script is better understood as a continuation-quality classifier than as a traditional signal generator. It does not attempt to predict every reversal, and it does not assume that all pullbacks within trend are equal. Its main purpose is to organize pullback structure into a clearer analytical framework.
UNIQUE EDGE
The core difference of this script is its emphasis on pullback quality rather than trend flips.
Many Supertrend-based tools are centered around directional transitions. That approach can be useful, but it also tends to compress several different market behaviors into a single yes/no event. In practice, not every trend pullback carries the same structural character. Some are shallow and noisy, some are too deep, and some interact with the trend line in a more orderly way before continuation attempts develop.
AG Pro Supertrend Pullback Quality focuses on that middle layer. It studies what happens after a trend is already active and asks a more specific question: is the current pullback behaving like a controlled retracement, or is it showing weaker continuation quality?
This creates a more workflow-oriented reading model. Instead of using Supertrend only as a directional switch, the script uses it as a live structural reference and grades the quality of pullback interaction around that reference. That makes the tool different from standard flip scripts, entry-only markers, and pure trend state displays.
METHODOLOGY
The script begins with the native Supertrend framework to define active directional context. Once a bullish or bearish state is established, a touch zone is formed around the relevant Supertrend line using ATR-based spacing. This zone is not meant to represent a guaranteed support or resistance region. It is a structured interaction area used to evaluate how price behaves during retracement.
From there, the script evaluates pullback quality through several components:
1) Trend State and Age
A newly flipped trend often behaves differently from a more established one. For that reason, the script includes a stabilization concept and tracks how mature the current trend leg is before weighting pullback quality.
2) Pullback Depth
The retracement is measured relative to ATR and recent price structure. Pullbacks that are too shallow may carry limited informational value, while pullbacks that are too deep may indicate reduced continuation quality. The script scores depth inside a preferred operating range rather than treating all pullbacks equally.
3) Acceptance Relative to the Supertrend Line
A pullback is not evaluated only by whether price touches the zone. The script also checks whether price remains positioned in a way that supports the active trend state. This helps separate cleaner acceptance behavior from weaker interaction.
4) Rejection Character
When price reaches the pullback area, candle behavior matters. The script looks at rejection-style characteristics within the touch and recovery window to estimate whether price is responding constructively to the active trend reference.
5) Recovery Efficiency
After contact with the zone, the script measures whether the market recovers with enough directional efficiency. Fast and orderly recovery behavior is treated differently from hesitant or weak re-expansion.
6) Noise Filter
Frequent directional churn and inefficient travel can reduce the usefulness of pullback classification. The script includes a noise component so that structurally weaker environments do not receive the same quality treatment as cleaner trend conditions.
These components are combined into a final score, which is then mapped into a simple class output. This makes the visual output easier to read without hiding the fact that pullback quality is multi-factor by nature.
QUALITY CLASSES
The final result is summarized into four broad classes:
A-Class
Represents the strongest pullback quality readings among the currently evaluated conditions.
B-Class
Represents constructive pullback quality, but with less strength than the highest tier.
C-Class
Represents acceptable but weaker pullback structure.
Weak
Represents pullback conditions that do not meet the stronger quality profile.
These classes are meant to organize chart behavior, not to forecast a required outcome. They should be interpreted within broader market context, timeframe behavior, and the user’s own process.
CHART ELEMENTS
The script includes several visual layers:
- Supertrend line for directional context
- ATR-based touch zone around the active Supertrend reference
- Pullback quality labels for qualified events
- Compact information panel showing trend state, depth, acceptance, rejection, recovery, noise, and final status
The visual design is intentionally restrained so that price remains readable. The goal is to keep the chart informative without turning the overlay into a dense signal map.
SIGNALS AND ALERTS
The script can generate alerts for the following event types:
- Bullish Pullback Quality Ready
- Bearish Pullback Quality Ready
- Bullish Pullback Confirmed
- Bearish Pullback Confirmed
- Bullish Pullback Invalidated
- Bearish Pullback Invalidated
In general terms, Ready events indicate that the recent pullback has achieved the minimum quality conditions defined by the model. Confirmed events require stronger follow-through logic. Invalidated events help flag cases where a previously qualified pullback context is no longer aligned with the prior state.
These alerts are designed as structured workflow checkpoints rather than standalone instructions.
KEY INPUTS
ATR Length
Controls the ATR foundation used by the Supertrend and zone logic.
Supertrend Factor
Adjusts the spacing and sensitivity of the Supertrend calculation.
Pullback Lookback
Defines the local structure window used during pullback evaluation.
Stabilization Bars After Flip
Helps reduce the weight of very early post-flip behavior.
Recovery Window
Defines how long the script should monitor post-touch recovery behavior.
Touch Zone Size and Max Line Penetration
Control how the script defines valid interaction around the Supertrend line.
Depth Range Inputs
Allow users to define what the script should consider a more optimal pullback depth range.
Ready and Confirmed Score Thresholds
Allow the strictness of class qualification and alert generation to be tuned.
LIMITATIONS AND TRANSPARENCY
This script is an analytical classification tool. It does not know future price action, and it does not guarantee continuation after a qualified pullback.
Like other trend-following frameworks, Supertrend-based structure can become less reliable during choppy or highly unstable market phases. The inclusion of a noise filter helps address that issue, but it does not remove it.
The quality model is also sensitive to volatility, timeframe selection, and the interaction between ATR-based spacing and local structure. A pullback that appears constructive on one timeframe may not behave the same way on another. Users should test settings carefully and interpret results in context.
Labels and classes summarize a model output. They are not a substitute for broader chart reading, risk planning, liquidity awareness, or execution discipline.
RISK DISCLOSURE
This script is provided for technical analysis and chart study only. It does not provide financial, investment, legal, or tax advice.
Trading and investing involve risk. Past behavior, structural classification, and indicator output do not guarantee future results. Users are responsible for their own decisions, testing process, and risk management framework.
リリースノート
Update Notes - V1.5This update refines the script’s pullback evaluation model and visual presentation while keeping the core use case unchanged.
What was improved:
- Refined the quality engine with additional line-respect and trend-slope context to make pullback grading more selective.
- Standardized the panel header into a single merged top row with the script name for a cleaner and more consistent layout.
- Updated panel readability with clearer contrast and a more polished dark/light presentation.
- Set the default panel text size to Small and the default label size to Normal for better chart balance.
- Improved touch-zone and line styling so the chart remains easier to read during active trend phases.
- Reduced label clustering in tight sequences by filtering nearby same-direction signals more aggressively.
- Compressed confirmed label wording to keep signal tags lighter and less intrusive on price action.
- Improved marker and label behavior so high-density areas stay cleaner without changing the script’s analytical purpose.
General note:
This update is focused on readability, visual consistency, and cleaner signal presentation. It does not remove the need for chart context, market structure review, or user-defined confirmation rules.
Risk disclosure:
This script is for chart analysis and alert support only. It is not a trading system, does not predict future results, and should not be treated as financial advice.
リリースノート
Update Notes - Version 2.0This update focuses on cleaner structure reading, stronger visual hierarchy, and a more premium continuation workflow around Supertrend pullbacks.
What's new in this version:
- Added a live reaction box to map the active pullback area with clearer on-chart context.
- Added a projected reclaim line to define the continuation trigger more cleanly after a valid reaction.
- Upgraded the scoring model to evaluate pullback compression, line respect, trend-side acceptance, rebound quality, reclaim pressure, slope, noise, and touch efficiency.
- Added staged setup logic with Watching, Armed, and Triggered states for easier decision flow.
- Added structural invalidation logic when the pullback loses its reaction map before confirmation.
- Improved label spacing and clustering to keep the chart premium, readable, and less crowded.
- Upgraded the panel layout with the AG Pro merged blue header, theme controls, location controls, and adjustable font sizing.
- Refined the visual balance of lane shading, labels, markers, and mapped zones for a cleaner public-release presentation.
This update does not change the core purpose of the script.
It still focuses on analyzing Supertrend pullback behavior inside an active trend and highlighting higher-quality continuation reactions with better structure and clarity.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
⚡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
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
⚡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
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。