OPEN-SOURCE SCRIPT
更新済 AG Pro Trend Continuation Quality [AGPro Series]

AG Pro Trend Continuation Quality [AGPro Series]
Overview / What it does
AG Pro Trend Continuation Quality is an overlay built to evaluate whether a pullback is behaving like a healthy retracement inside an active trend, or whether the move is losing structural quality before continuation can develop.
Instead of treating every dip in an uptrend or every pop in a downtrend as equally important, the script isolates pullback sequences and scores them through a continuation-quality framework. The goal is not to predict every next candle. The goal is to help traders judge whether the market is showing disciplined retracement behavior that often precedes trend continuation.
The model combines trend alignment, pullback depth, pullback duration, relative volume behavior during the retracement, and the strength of the bounce candle that attempts to resume the trend. These conditions are translated into a compact quality score so the user can quickly separate cleaner continuation structures from weaker ones.
On the chart, the script highlights pullback zones, tracks the retracement box, displays a continuation-quality label, and maintains an information panel that summarizes trend state, recent quality readings, best quality, average quality, and internal distribution data. The result is a workflow-oriented continuation map rather than a simple trend-following overlay.
Unique Edge
The distinctive part of this script is that it does not label trend continuation from trend direction alone. A bullish EMA stack or bearish EMA stack is not enough by itself. The script specifically evaluates the quality of the retracement before the continuation attempt is scored.
That makes it meaningfully different from basic EMA trend tools, pullback highlighters, or single-condition continuation signals. Many tools can say that price is above or below an average. Fewer tools attempt to measure whether the internal anatomy of the pullback remains constructive for continuation.
The scoring engine focuses on five practical questions:
1. Is the broader trend aligned?
2. Is the pullback still structurally controlled rather than excessively deep?
3. Did the retracement last a reasonable number of bars?
4. Did volume contract during the pullback instead of expanding aggressively against trend?
5. Did the bounce show enough intent to suggest renewed directional participation?
This creates a cleaner framework for evaluating continuation setups in a way that is visual, systematic, and easier to compare across multiple pullbacks on the same chart.
Methodology
The script first determines directional context using EMA alignment and, when needed, swing-structure logic. This creates a working trend state that frames whether the script should be looking for bullish or bearish pullback behavior.
Once a directional leg is active, the script begins tracking a pullback when price retraces against that trend. During the retracement, it measures:
- how far the pullback travels relative to the prior trend leg,
- how many bars the pullback lasts,
- how pullback volume compares with the prior expansion leg,
- and whether the bounce candle shows convincing re-engagement.
These components are translated into a 0 to 10 quality score. Higher scores represent more orderly and structurally coherent pullbacks. Lower scores represent weaker or more suspect retracements.
The visual output is designed to make those evaluations easier to read in real time:
- pullback boxes frame the retracement zone,
- optional fib-depth line shows the deepest retracement point tracked inside the pullback,
- labels display score, quality grade, depth, duration, and relative volume,
- panel metrics summarize the current continuation environment.
Signals & Alerts
The script is designed as a quality-mapping tool, not as an automatic trade system.
Its event logic revolves around the completion of a pullback and the appearance of a bounce candle that attempts to resume the trend. When that bounce qualifies, the script calculates the final continuation-quality score and can display the setup if it meets the user-defined minimum score threshold.
Available workflow signals include:
- active bullish or bearish trend state,
- pullback in progress,
- completed pullback with scored continuation attempt,
- high-quality continuation events when the score reaches stronger thresholds.
Optional alerts can be used for:
- high-quality continuation conditions,
- or any scored pullback event, depending on user preference.
Because alerts are tied to the script’s scoring and confirmation logic, they are intended to support chart review and decision-making rather than act as guaranteed execution instructions.
Key Inputs
EMA Fast Length / EMA Mid Length / EMA Slow Length
These define the trend stack used to frame directional bias.
Swing Pivot Length
Controls the swing-structure sensitivity used in secondary trend detection.
Max Pullback Depth (%)
Defines how strict the script is when assessing whether a retracement remains healthy relative to the prior trend leg.
Min Pullback Bars / Max Pullback Bars
Controls the acceptable pullback duration window.
Volume Decline Ratio
Helps determine whether the retracement is occurring on lighter activity relative to the prior directional leg.
Minimum Score to Display
Filters weaker continuation events from the chart.
Label Size / Label Offset / Reduce Label Overlap
Lets the user adapt chart readability to their own zoom level and instrument volatility.
Panel Position / Panel Font Size / Panel Theme
Allows the continuation dashboard to be integrated into different chart layouts without dominating screen space.
Limitations & Transparency
This script does not know future market intent. It evaluates observable price and volume behavior after conditions form on the chart.
A high score does not guarantee continuation. It only indicates that the completed pullback meets the script’s internal definition of stronger continuation quality relative to other pullbacks.
The model is also sensitive to market regime. Trend continuation behavior tends to be clearer in directional markets and less reliable in highly compressed, erratic, or news-driven conditions.
Volume behavior can vary across instruments and data feeds. On some assets, especially where volume data is synthetic, limited, or structurally uneven, the volume component should be interpreted with caution.
Like other structure-based tools, this script can produce different practical usefulness depending on timeframe, instrument, volatility regime, and chart cleanliness. Users should calibrate inputs based on the market they are studying rather than treating defaults as universal settings.
This script should not be viewed as:
- a prediction engine,
- a standalone trade system,
- a replacement for risk management,
- or a guarantee that a bounce will develop into a full continuation leg.
Risk Disclosure
This script is for chart analysis and educational use. It is designed to help users study pullback quality inside established trends, not to provide financial, investment, or trading advice.
All trading and investing involve risk. Market conditions can change quickly, and even high-quality continuation structures can fail. Users should apply their own confirmation process, position sizing rules, and risk controls before acting on any market observation.
Use the script as a structured continuation framework, not as certainty.
Overview / What it does
AG Pro Trend Continuation Quality is an overlay built to evaluate whether a pullback is behaving like a healthy retracement inside an active trend, or whether the move is losing structural quality before continuation can develop.
Instead of treating every dip in an uptrend or every pop in a downtrend as equally important, the script isolates pullback sequences and scores them through a continuation-quality framework. The goal is not to predict every next candle. The goal is to help traders judge whether the market is showing disciplined retracement behavior that often precedes trend continuation.
The model combines trend alignment, pullback depth, pullback duration, relative volume behavior during the retracement, and the strength of the bounce candle that attempts to resume the trend. These conditions are translated into a compact quality score so the user can quickly separate cleaner continuation structures from weaker ones.
On the chart, the script highlights pullback zones, tracks the retracement box, displays a continuation-quality label, and maintains an information panel that summarizes trend state, recent quality readings, best quality, average quality, and internal distribution data. The result is a workflow-oriented continuation map rather than a simple trend-following overlay.
Unique Edge
The distinctive part of this script is that it does not label trend continuation from trend direction alone. A bullish EMA stack or bearish EMA stack is not enough by itself. The script specifically evaluates the quality of the retracement before the continuation attempt is scored.
That makes it meaningfully different from basic EMA trend tools, pullback highlighters, or single-condition continuation signals. Many tools can say that price is above or below an average. Fewer tools attempt to measure whether the internal anatomy of the pullback remains constructive for continuation.
The scoring engine focuses on five practical questions:
1. Is the broader trend aligned?
2. Is the pullback still structurally controlled rather than excessively deep?
3. Did the retracement last a reasonable number of bars?
4. Did volume contract during the pullback instead of expanding aggressively against trend?
5. Did the bounce show enough intent to suggest renewed directional participation?
This creates a cleaner framework for evaluating continuation setups in a way that is visual, systematic, and easier to compare across multiple pullbacks on the same chart.
Methodology
The script first determines directional context using EMA alignment and, when needed, swing-structure logic. This creates a working trend state that frames whether the script should be looking for bullish or bearish pullback behavior.
Once a directional leg is active, the script begins tracking a pullback when price retraces against that trend. During the retracement, it measures:
- how far the pullback travels relative to the prior trend leg,
- how many bars the pullback lasts,
- how pullback volume compares with the prior expansion leg,
- and whether the bounce candle shows convincing re-engagement.
These components are translated into a 0 to 10 quality score. Higher scores represent more orderly and structurally coherent pullbacks. Lower scores represent weaker or more suspect retracements.
The visual output is designed to make those evaluations easier to read in real time:
- pullback boxes frame the retracement zone,
- optional fib-depth line shows the deepest retracement point tracked inside the pullback,
- labels display score, quality grade, depth, duration, and relative volume,
- panel metrics summarize the current continuation environment.
Signals & Alerts
The script is designed as a quality-mapping tool, not as an automatic trade system.
Its event logic revolves around the completion of a pullback and the appearance of a bounce candle that attempts to resume the trend. When that bounce qualifies, the script calculates the final continuation-quality score and can display the setup if it meets the user-defined minimum score threshold.
Available workflow signals include:
- active bullish or bearish trend state,
- pullback in progress,
- completed pullback with scored continuation attempt,
- high-quality continuation events when the score reaches stronger thresholds.
Optional alerts can be used for:
- high-quality continuation conditions,
- or any scored pullback event, depending on user preference.
Because alerts are tied to the script’s scoring and confirmation logic, they are intended to support chart review and decision-making rather than act as guaranteed execution instructions.
Key Inputs
EMA Fast Length / EMA Mid Length / EMA Slow Length
These define the trend stack used to frame directional bias.
Swing Pivot Length
Controls the swing-structure sensitivity used in secondary trend detection.
Max Pullback Depth (%)
Defines how strict the script is when assessing whether a retracement remains healthy relative to the prior trend leg.
Min Pullback Bars / Max Pullback Bars
Controls the acceptable pullback duration window.
Volume Decline Ratio
Helps determine whether the retracement is occurring on lighter activity relative to the prior directional leg.
Minimum Score to Display
Filters weaker continuation events from the chart.
Label Size / Label Offset / Reduce Label Overlap
Lets the user adapt chart readability to their own zoom level and instrument volatility.
Panel Position / Panel Font Size / Panel Theme
Allows the continuation dashboard to be integrated into different chart layouts without dominating screen space.
Limitations & Transparency
This script does not know future market intent. It evaluates observable price and volume behavior after conditions form on the chart.
A high score does not guarantee continuation. It only indicates that the completed pullback meets the script’s internal definition of stronger continuation quality relative to other pullbacks.
The model is also sensitive to market regime. Trend continuation behavior tends to be clearer in directional markets and less reliable in highly compressed, erratic, or news-driven conditions.
Volume behavior can vary across instruments and data feeds. On some assets, especially where volume data is synthetic, limited, or structurally uneven, the volume component should be interpreted with caution.
Like other structure-based tools, this script can produce different practical usefulness depending on timeframe, instrument, volatility regime, and chart cleanliness. Users should calibrate inputs based on the market they are studying rather than treating defaults as universal settings.
This script should not be viewed as:
- a prediction engine,
- a standalone trade system,
- a replacement for risk management,
- or a guarantee that a bounce will develop into a full continuation leg.
Risk Disclosure
This script is for chart analysis and educational use. It is designed to help users study pullback quality inside established trends, not to provide financial, investment, or trading advice.
All trading and investing involve risk. Market conditions can change quickly, and even high-quality continuation structures can fail. Users should apply their own confirmation process, position sizing rules, and risk controls before acting on any market observation.
Use the script as a structured continuation framework, not as certainty.
リリースノート
Update Notes - V1.1This update focuses on visual consistency, label control, and overall chart readability.
What changed
• Unified label sizing so all chart labels now follow the same Label Size setting.
• Refined the panel presentation with a cleaner first row structure and a stronger premium visual layout.
• Improved label consistency across the chart for a more balanced appearance.
• Reduced visual friction between signal elements to keep the chart easier to read.
• Preserved the core continuation-quality logic while improving presentation quality.
Why this update was made
The goal of this revision was to make the script cleaner, more consistent, and easier to use in real chart conditions. The scoring framework remains focused on trend continuation pullbacks, while the visual layer is now more aligned with the rest of the AG Pro design language.
Notes
• This update is primarily a presentation and usability refinement.
• No promise of predictive accuracy is made.
• The script is designed for chart analysis, contextual review, and alert-based workflow support.
• It should be used together with market structure, trend context, and user discretion.
Risk Disclosure
This indicator is for educational and analytical purposes only. It does not provide financial advice, trading advice, or guaranteed outcomes. All trading decisions remain the responsibility of the user.
リリースノート
Update Notes - V2.0This update keeps Trend Continuation Quality in the same continuation-focused lane, but makes the workflow more distinctive, more readable, and more chart-friendly.
What changed
1. New continuation pocket zones
Qualified continuation signals can now project a forward re-entry pocket so traders can monitor where orderly continuation may remain valid after the first bounce.
2. Stronger scoring model
The continuation score now blends trend alignment, pullback depth, pullback duration, volume contraction, bounce intent, and anchor respect. This keeps the script focused on retracement quality instead of simple trend direction.
3. Cleaner premium visual structure
Qualified pullbacks now use a more refined AGPro color hierarchy, better box layering, and cleaner on-chart labels with controlled spacing.
4. Better chart density control
Same-side signal cooldown and max-history controls were added to reduce clutter while still keeping the chart visually alive.
5. Upgraded AGPro panel standard
The info panel now follows the merged blue header format, keeps AG Pro branding inside the panel title, and exposes panel position and theme controls.
6. Naming update for public release
The public script title now follows the new AGPro naming format by removing the AG Pro prefix from the TradingView title while preserving AG Pro inside the panel title and short title.
Why this update was made
The goal of this revision was to give the script a stronger visual identity and a more useful continuation workflow without changing its core concept. It remains a trend continuation quality tool, but now presents that idea in a more premium and distinctive way.
リリースノート
UPDATE NOTES - v2.3This update focuses on chart readability and panel clarity.
The core purpose of the script remains unchanged. This release balances label
spacing, improves label and badge readability, and cleans up the panel so it
shows numeric values only.
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
------------------------
- Better label spacing by default
The same-side cooldown was increased so successive same-direction labels keep
more breathing room. Signal Density stays at Balanced so the chart keeps a
healthy number of qualified continuation structures without crowding or
overlapping labels.
- Cleaner panel values
The Best and Average rows now display numeric scores only. The previous text
bar characters were removed for a more compact, professional panel.
- Theme-aware label and badge text
The main continuation labels and the compact score badges choose a text color
that reads clearly on every quality color, so lighter mint and pink labels are
no longer hard to read.
- Leaner code
An unused text-bar helper was removed.
------------------------
Visual Improvements
------------------------
- Balanced label spacing for a cleaner, well-populated chart.
- Contrast-safe continuation labels and score badges across all quality grades.
- Numeric-only panel values with no decorative characters.
- Preserved the familiar pullback box, depth line, pocket, and panel layout.
------------------------
Interface & Usability
------------------------
- Cleaner chart with balanced annotation spacing at default settings.
- More readable continuation labels and score badges.
- Simplified panel value formatting.
- Enhanced overall user experience without changing core logic.
------------------------
Behavior Notes
------------------------
This update does not change the core analytical logic of the script.
The trend engine, the pullback tracking, the six-factor continuation scoring,
the grade tiers, the continuation pocket projection, and every panel statistic
all behave exactly as before. Only the default annotation spacing and the panel
value formatting changed; users who prefer more or fewer annotations can switch
Signal Density between Aggressive, Balanced, and Selective.
Users should interpret outputs the same way as before, with a cleaner chart.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, and timeframe differences may
affect how continuation structures 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.
リリースノート
🔧 UPDATE NOTES - v2.4This update adds a single next-action row and a continuation-rate proof.
The core purpose of the script remains unchanged.
It continues to score trend-continuation pullbacks on depth, volume contraction and bounce
intent, with the same pullback boxes, continuation pockets and score badges.
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
------------------------
- Action row
The panel now translates the current context into a single plain next-step read such as
Track Bull Pullback, Watch Bull Pocket, Review Retest, or Wait Pullback.
- Continuation Rate proof layer
The panel now reports how often qualified continuation signals historically followed through
in the signal direction before moving against it, shown with the sample count for transparency.
- Continuation Proof Window input
A new setting controls the window used to measure follow-through.
- Per-signal counting
Each drawn continuation signal is counted once, so the rate is an honest measure of
follow-through on the selected market and timeframe.
------------------------
Visual Improvements
------------------------
- Preserved the pullback boxes, continuation pockets, depth lines and score badges
- Kept staggered label placement and same-side cooldown for breathable spacing
- Maintained automatic label-text contrast on every badge
- Left the publication-ready chart layout intact
------------------------
Interface & Usability
------------------------
- Added an Action row at the top of the panel for an immediate next-step read
- Added a Continuation Rate row for an at-a-glance follow-through track record
- Added a window setting so the proof measures prompt follow-through
- Enhanced overall user experience without changing the core scoring logic
------------------------
Behavior Notes
------------------------
This update does not change the core analytical logic of the script.
The continuation score, grades, pullback boxes and pockets are unchanged. The Action row
restates existing context, and the Continuation Rate is a separate historical track-record layer.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, and timeframe differences may affect how
continuations, pockets and the 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.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
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
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
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
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。