OPEN-SOURCE SCRIPT
Cập nhật AG Pro ROC Momentum Shift Map [AGPro Series]

AG Pro ROC Momentum Shift Map [AGPro Series]
Overview / What it does
AG Pro ROC Momentum Shift Map is a momentum-regime tool built around the Rate of Change (ROC) concept, but organized as a transition map rather than a standalone oscillator. Instead of treating ROC as a simple line that moves above or below zero, this script tracks how momentum shifts from one regime to another, whether that transition is strengthening or fading, and whether the current phase is fresh, mature, or beginning to stall.
The script is designed to help users read momentum behavior in a more structured way. It separates bullish and bearish momentum into shift and expansion phases, then adds context through transition-zone logic, baseline separation, freshness tracking, and exhaustion risk. This allows the chart to show not only direction, but also the condition of that direction.
This publication is not intended to forecast tops, bottoms, or future price movement. It is a context tool that organizes ROC behavior into states that may help users evaluate whether momentum is attempting to change character, continue, or lose efficiency.
Unique Edge
The main difference between this script and many ROC-based publications is that it does not present ROC as a raw crossing signal. It reframes ROC as a regime map with state logic, quality scoring, and momentum-stage classification.
Within the AG Pro series, this script also has a different purpose than the previously published tools. It is not a breakout-quality model, not a pullback validator, not a support/resistance reaction map, not a relative-strength rotation framework, and not a correlation-stress tool. Those scripts focus on structure, levels, cross-asset comparison, reclaim behavior, or directional pressure. This script focuses on internal momentum state transitions derived from ROC behavior itself.
More specifically:
- It differs from breakout or retest-oriented scripts because it does not judge price interaction with a key level.
- It differs from reaction-map scripts because it does not score how price behaves around predefined structures such as pivots, support/resistance, or moving-average reclaim zones.
- It differs from pressure or trend-strength tools because its goal is not to estimate directional force in isolation, but to classify whether momentum is transitioning, expanding, contracting, or stalling.
- It differs from relative-strength tools because it does not compare one symbol against another symbol or benchmark.
That distinction is the core of the script’s originality: it uses ROC to map momentum regime transitions, not merely to display momentum magnitude.
Methodology
The script begins with a Rate of Change calculation over a user-defined length and optionally smooths that series to reduce small fluctuations. A regime baseline is then derived from the ROC series to establish whether current momentum is operating above or below its local equilibrium.
A dynamic transition zone is built from ROC volatility. This zone is used to identify areas where momentum is attempting to move from one regime into another. Instead of using a rigid zero-line interpretation alone, the script evaluates whether ROC is operating inside or outside this transition area and whether slope supports the move.
The internal state engine classifies momentum into five main conditions:
- Bull Shift
- Bull Expansion
- Bear Shift
- Bear Expansion
- Neutral / Compression
To add structure beyond simple state assignment, the script estimates Shift Quality using a combination of zone positioning, slope behavior, separation from the regime baseline, and acceleration. A whipsaw-sensitive penalty reduces the score when repeated zero-line crossings suggest unstable momentum behavior.
The script also tracks how long the current state has been active. That information is used to classify the move as Fresh, Active, Mature, Stale, or Stalling. Expansion and contraction logic are then layered on top to provide a clearer view of whether momentum is broadening or fading. Finally, an exhaustion-risk estimate is derived from adverse slope, adverse acceleration, and contraction behavior against the current state.
Signals & Alerts
This script provides state-based informational events rather than trade promises. The built-in alert set is designed to mark notable momentum transitions in a deterministic way:
- Bull Shift Detected
- Bull Expansion Active
- Bear Shift Detected
- Bear Expansion Active
- Momentum Stalling
These alerts are best interpreted as momentum-context events. They are not guarantees of continuation, reversal, or trade outcome.
Key Inputs
Important inputs include:
- ROC Length: defines the main lookback used for Rate of Change.
- ROC Smoothing: reduces short-term noise in the raw ROC series.
- Regime Baseline Length: sets the local reference used for momentum separation.
- Transition Zone Length and Multiplier: control the width and sensitivity of the transition area.
- Quality Normalization Length: affects how the quality model normalizes slope and ROC magnitude.
- Whipsaw Lookback: influences how aggressively unstable zero-line rotation is penalized.
- Freshness thresholds: define how quickly a state progresses from fresh to mature or stale.
Users can also customize visual behavior such as histogram visibility, transition-zone display, background shading, labels, and panel presentation.
Limitations & Transparency
This script is an analytical indicator, not a prediction engine. ROC is a momentum derivative, so it can react quickly but can also become unstable in choppy or mean-reverting environments. During low-quality market conditions, momentum may rotate repeatedly around the transition zone and generate less reliable state changes.
Shift Quality is an internal scoring framework created to organize momentum transitions more clearly. It is not an objective universal measure of trade quality, and it should not be interpreted as proof of future performance.
Freshness, expansion, contraction, and exhaustion labels are contextual classifications based on the script’s internal logic. They are intended to help users structure momentum analysis, not to replace broader chart reading, trend assessment, market structure work, or risk management.
As with any indicator, outputs can vary depending on symbol characteristics, volatility regime, timeframe, and user settings. This script should be used as one analytical layer within a broader decision process.
Risk Disclosure
This indicator is for chart analysis and educational use. It does not provide investment advice, trading advice, or guaranteed results. Financial markets involve risk, and no indicator can ensure favorable outcomes. Users should evaluate the script in their own workflow, test settings carefully, and apply independent judgment before making trading decisions.
Overview / What it does
AG Pro ROC Momentum Shift Map is a momentum-regime tool built around the Rate of Change (ROC) concept, but organized as a transition map rather than a standalone oscillator. Instead of treating ROC as a simple line that moves above or below zero, this script tracks how momentum shifts from one regime to another, whether that transition is strengthening or fading, and whether the current phase is fresh, mature, or beginning to stall.
The script is designed to help users read momentum behavior in a more structured way. It separates bullish and bearish momentum into shift and expansion phases, then adds context through transition-zone logic, baseline separation, freshness tracking, and exhaustion risk. This allows the chart to show not only direction, but also the condition of that direction.
This publication is not intended to forecast tops, bottoms, or future price movement. It is a context tool that organizes ROC behavior into states that may help users evaluate whether momentum is attempting to change character, continue, or lose efficiency.
Unique Edge
The main difference between this script and many ROC-based publications is that it does not present ROC as a raw crossing signal. It reframes ROC as a regime map with state logic, quality scoring, and momentum-stage classification.
Within the AG Pro series, this script also has a different purpose than the previously published tools. It is not a breakout-quality model, not a pullback validator, not a support/resistance reaction map, not a relative-strength rotation framework, and not a correlation-stress tool. Those scripts focus on structure, levels, cross-asset comparison, reclaim behavior, or directional pressure. This script focuses on internal momentum state transitions derived from ROC behavior itself.
More specifically:
- It differs from breakout or retest-oriented scripts because it does not judge price interaction with a key level.
- It differs from reaction-map scripts because it does not score how price behaves around predefined structures such as pivots, support/resistance, or moving-average reclaim zones.
- It differs from pressure or trend-strength tools because its goal is not to estimate directional force in isolation, but to classify whether momentum is transitioning, expanding, contracting, or stalling.
- It differs from relative-strength tools because it does not compare one symbol against another symbol or benchmark.
That distinction is the core of the script’s originality: it uses ROC to map momentum regime transitions, not merely to display momentum magnitude.
Methodology
The script begins with a Rate of Change calculation over a user-defined length and optionally smooths that series to reduce small fluctuations. A regime baseline is then derived from the ROC series to establish whether current momentum is operating above or below its local equilibrium.
A dynamic transition zone is built from ROC volatility. This zone is used to identify areas where momentum is attempting to move from one regime into another. Instead of using a rigid zero-line interpretation alone, the script evaluates whether ROC is operating inside or outside this transition area and whether slope supports the move.
The internal state engine classifies momentum into five main conditions:
- Bull Shift
- Bull Expansion
- Bear Shift
- Bear Expansion
- Neutral / Compression
To add structure beyond simple state assignment, the script estimates Shift Quality using a combination of zone positioning, slope behavior, separation from the regime baseline, and acceleration. A whipsaw-sensitive penalty reduces the score when repeated zero-line crossings suggest unstable momentum behavior.
The script also tracks how long the current state has been active. That information is used to classify the move as Fresh, Active, Mature, Stale, or Stalling. Expansion and contraction logic are then layered on top to provide a clearer view of whether momentum is broadening or fading. Finally, an exhaustion-risk estimate is derived from adverse slope, adverse acceleration, and contraction behavior against the current state.
Signals & Alerts
This script provides state-based informational events rather than trade promises. The built-in alert set is designed to mark notable momentum transitions in a deterministic way:
- Bull Shift Detected
- Bull Expansion Active
- Bear Shift Detected
- Bear Expansion Active
- Momentum Stalling
These alerts are best interpreted as momentum-context events. They are not guarantees of continuation, reversal, or trade outcome.
Key Inputs
Important inputs include:
- ROC Length: defines the main lookback used for Rate of Change.
- ROC Smoothing: reduces short-term noise in the raw ROC series.
- Regime Baseline Length: sets the local reference used for momentum separation.
- Transition Zone Length and Multiplier: control the width and sensitivity of the transition area.
- Quality Normalization Length: affects how the quality model normalizes slope and ROC magnitude.
- Whipsaw Lookback: influences how aggressively unstable zero-line rotation is penalized.
- Freshness thresholds: define how quickly a state progresses from fresh to mature or stale.
Users can also customize visual behavior such as histogram visibility, transition-zone display, background shading, labels, and panel presentation.
Limitations & Transparency
This script is an analytical indicator, not a prediction engine. ROC is a momentum derivative, so it can react quickly but can also become unstable in choppy or mean-reverting environments. During low-quality market conditions, momentum may rotate repeatedly around the transition zone and generate less reliable state changes.
Shift Quality is an internal scoring framework created to organize momentum transitions more clearly. It is not an objective universal measure of trade quality, and it should not be interpreted as proof of future performance.
Freshness, expansion, contraction, and exhaustion labels are contextual classifications based on the script’s internal logic. They are intended to help users structure momentum analysis, not to replace broader chart reading, trend assessment, market structure work, or risk management.
As with any indicator, outputs can vary depending on symbol characteristics, volatility regime, timeframe, and user settings. This script should be used as one analytical layer within a broader decision process.
Risk Disclosure
This indicator is for chart analysis and educational use. It does not provide investment advice, trading advice, or guaranteed results. Financial markets involve risk, and no indicator can ensure favorable outcomes. Users should evaluate the script in their own workflow, test settings carefully, and apply independent judgment before making trading decisions.
Phát hành các Ghi chú
UPDATE NOTES - V1.1This update focuses on visual presentation, panel readability, and overall chart clarity. The goal of the release is to make regime transitions, momentum shifts, and expansion/compression context easier to read at a glance without changing the script’s core analytical purpose.
What changed in this update:
• Refined the oscillator presentation to create a cleaner visual hierarchy between ROC momentum, the regime baseline, and the transition area.
• Improved the transition-zone rendering so compression and shift phases are easier to distinguish during live chart use.
• Adjusted the histogram and fill presentation for a more organized momentum readout across bullish, bearish, and neutral conditions.
• Refreshed the background regime shading to improve contextual readability without overwhelming price action or the oscillator workspace.
• Reworked label presentation and spacing for cleaner identification of Bull Shift, Bull Expansion, Bear Shift, Bear Expansion, and stalling events.
• Upgraded the panel styling and row contrast so state, bias, shift quality, freshness, expansion, and exhaust-risk information are easier to read quickly.
• Improved the overall visual balance of the script so the tool feels cleaner, more structured, and easier to interpret in real chart conditions.
What did not change:
• No change to the script’s core ROC state engine.
• No change to the underlying shift / expansion classification framework.
• No change to the documented purpose of the indicator.
• No change to the existing alert semantics.
Notes:
AG Pro ROC Momentum Shift Map is designed to organize momentum-state transitions around ROC behavior, baseline relationship, expansion pressure, freshness, and exhaustion context. It is not presented as a prediction engine, and it should not be treated as a standalone trading system.
As with prior versions, the script is intended to help users read momentum structure more clearly, especially during transition periods where directional pressure can strengthen, stall, compress, or reverse.
Risk Disclosure:
This script is for educational and informational use only. It does not provide financial advice, investment advice, or guaranteed outcomes. All trading decisions remain the responsibility of the user.
Phát hành các Ghi chú
Update Notes - V1.1This update focuses on presentation consistency, signal readability, and panel standardization while preserving the core ROC momentum regime framework.
• Reworked the panel structure to match the current AG Pro visual standard.
• Added a single merged blue header row for a cleaner and more consistent panel layout.
• Kept the panel font size aligned with the current default small-format presentation.
• Reorganized the inputs into clearer groups for faster configuration and cleaner settings navigation.
• Refined the momentum visual stack with a cleaner ROC glow layer, more controlled transition-zone rendering, and a more balanced ROC / baseline fill.
• Adjusted visual opacity handling to improve chart readability and reduce unnecessary visual weight.
• Tightened label behavior with quality and cooldown filtering to reduce excessive signal clustering.
• Kept shift and expansion events confirmed on closed bars for more stable visual event printing.
• Improved panel color logic so state, quality, freshness, expansion, and risk blocks read more clearly in both dark and light themes.
• Standardized the overall presentation so the script fits better with the newer AG Pro publication style.
This update is primarily a usability, readability, and presentation refinement. It does not change the purpose of the script, which remains focused on helping users interpret ROC-based momentum shifts, expansion phases, and potential stalling conditions in a structured visual format.
For transparency:
This script is an analytical visualization tool. It does not guarantee outcomes, does not predict future price direction, and should be used with the user's own process, confirmation methods, and risk framework.
Phát hành các Ghi chú
Update Notes - v1.3This update focuses on visual refinement, chart readability, and a cleaner premium presentation.
What's improved
- Reworked the momentum display into a softer ROC underlay for a cleaner lower-pane look.
- Reduced visual noise by lowering default intensity across the wave fill, regime background, transition zone, and corridor layers.
- Tightened label filtering with higher quality requirements, wider cooldown spacing, and a lower visible-label cap.
- Shortened expansion labels for a cleaner visual hierarchy and removed early warmup labels that could crowd the left side of the pane.
- Limited background emphasis to stronger expansion states so the script feels more deliberate and less visually saturated.
- Reduced corridor intensity and box count so the feature supports the signal structure without dominating the chart.
- Softened baseline and neutral-state behavior for a more balanced premium finish.
What did not change
- The core ROC engine remains intact.
- Bull Shift, Bull Expansion, Bear Shift, and Bear Expansion logic is unchanged.
- Existing alert logic is unchanged.
Result
The script now reads faster, looks cleaner on live charts, and presents momentum transitions with stronger visual discipline.
Phát hành các Ghi chú
UPDATE NOTES - v1.4This update focuses on decision clarity and panel usability.
The core purpose of the script remains unchanged.
This release improves how the existing ROC regime, quality, transition, and
exhaustion logic is presented 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
------------------------
- Next Action readout
The summary panel now leads with a plain-language Next Action line that
synthesizes the current state, stalling status, exhaustion risk, and
transition pressure into a single suggested response (for example Ride Long -
Momentum Expanding, Trail Short - Momentum Fading, Long Setup - Bull Shift, Get
Ready - Breakout Loaded, or Stand Aside - Compression). It turns the existing
set of metrics into one clear at-a-glance read instead of leaving the reader
to combine the rows manually.
- Context-aware decision logic
The action line does not just echo the state. An expansion that is stalling or
carrying high exhaustion risk reads as Trail rather than Ride, and a
compression with loaded transition pressure reads as Get Ready rather than
Stand Aside. This keeps the guidance honest about how sustainable the current
momentum phase actually is.
- Adaptive panel contrast
The Next Action cell uses a luminance-aware text color so it stays crisp and
readable on both the AGPro Dark and Clean Light panel themes.
------------------------
Visual Improvements
------------------------
- Improved first-glance interpretation by surfacing the most actionable
information at the very top of the panel.
- Refined visual hierarchy so the suggested response stands out clearly above
the supporting regime metrics.
- Kept the ROC underlay, transition zone, corridors, and event labels at their
existing balanced density to preserve a premium, uncluttered pane.
------------------------
Interface & Usability
------------------------
- Optimized panel layout for clearer information flow from action to context.
- Improved label readability inside the panel across both themes.
- Enhanced overall user experience without changing core logic.
------------------------
Behavior Notes
------------------------
This update does not change the core analytical logic of the script.
The ROC regime classification, shift-quality model, transition pressure, and
exhaustion-risk engines behave exactly as before. The Next Action line is a
readability layer built directly on top of those existing outputs.
Users should interpret outputs the same way as before, now with a clearer
summary of the current momentum context.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, and timeframe differences may
affect how shifts, expansions, and stalling phases 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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.