OPEN-SOURCE SCRIPT
Обновлено

AG Pro Structural Momentum Oscillator [AGPro Series]

1 240
AG Pro Structural Momentum Oscillator [AGPro Series]

OVERVIEW

AG Pro Structural Momentum Oscillator evaluates momentum through price structure instead of relying on a standard oscillator formula alone. The goal is not to duplicate a classic RSI, MACD, or stochastic workflow, but to study how price behaves internally: where bars close within their own range, how upper and lower wicks are distributed, how efficiently directional travel develops, and whether pullbacks remain controlled or start to damage the underlying move.

This produces a structure-based momentum reading that is designed to help users distinguish between constructive directional pressure, weak or unstable movement, and transition phases. In practice, the oscillator is intended for traders who want more context than a simple overbought/oversold style reading, while still keeping the visual experience compact and readable in a separate pane.

The model is normalized into a clean oscillator format and supported by an optional panel that exposes the internal components behind the headline score. This makes the script easier to inspect without turning it into a crowded dashboard. The result is a momentum tool that remains chart-friendly while still offering transparency about what is driving the current state.

снимок

WHAT THIS SCRIPT DOES

This script builds a composite momentum score from structural price behavior. Instead of measuring momentum only through smoothed distance or rate-of-change logic, it examines whether bars are closing with quality, whether wick balance supports continuation or rejection, whether the move is advancing efficiently, whether counter-moves are being absorbed, and whether directional pressure is persisting across the selected lookback.

The oscillator is shown in a separate pane so that the price chart remains clean. Stronger bullish conditions push the reading toward the upper zone, stronger bearish conditions push it toward the lower zone, and transitional behavior tends to cluster around the middle band. Optional markers can highlight structural shifts, expansion entries, and midline events, while the panel can display both the current state and the underlying component scores.

UNIQUE EDGE

The core idea here is structure-based momentum assessment.

This script does not attempt to repackage a traditional oscillator with cosmetic changes. Its momentum reading is built from several structural observations working together:

- close quality within the bar range
- wick pressure balance
- impulse efficiency
- pullback control
- directional persistence

That combination is what makes the oscillator different. It is not asking only whether price moved. It is asking how price moved, whether that movement was internally supportive, and whether the recent sequence of bars reflects constructive continuation or unstable friction.

Because of that design, the oscillator can be useful in situations where traders want additional confirmation around trend continuation, weakening follow-through, or state transitions, without depending on a single legacy oscillator formula.

METHODOLOGY

The composite score is built from a weighted structural model.

1) Close Quality
This measures where the bar closes relative to its own range. Bars that close with directional conviction contribute more positively or negatively than bars that finish in weak or indecisive positions.

2) Wick Pressure
This evaluates the balance between upper and lower wick behavior. It helps estimate whether rejection pressure is supporting the current direction or working against it.

3) Impulse Efficiency
This compares net directional progress against recent travel. Large movement alone is not treated as strength if the structure is inefficient or overly noisy.

4) Pullback Control
This examines whether counter-direction movement remains contained or begins to undermine the active directional leg.

5) Persistence
This tracks whether structural bias has been holding together across the recent window instead of flipping constantly from bar to bar.

These components are normalized and combined into a structural momentum oscillator score. The separate panel allows users to inspect the same internal drivers individually, which can be helpful when the headline reading is near transition levels.

SIGNALS AND ALERTS

The oscillator can be used visually or through alerts.

Depending on settings, the script can monitor:

- bullish structural shifts
- bearish structural shifts
- bullish expansion entries
- bearish expansion entries
- midline events

Optional markers can be displayed directly in the oscillator pane. The legend row in the panel explains what each marker type represents. Users who prefer a cleaner presentation can disable markers or legend items from the settings.

As with most technical tools, signals are best interpreted in context. A structural shift is not the same thing as a trade command. It is an analytical event showing that the model detected a meaningful change in the balance of recent price behavior.

KEY INPUTS

The script includes the following input groups:

- structure length
- persistence window
- pullback window
- smoothing
- expansion thresholds
- panel visibility and font size
- signal marker mode
- marker legend visibility
- marker cooldown

These controls allow the user to keep the oscillator relatively clean by default, or expose more information when deeper inspection is needed.

HOW TO READ IT

A higher reading generally indicates stronger constructive bullish structure. A lower reading generally indicates stronger constructive bearish structure. Readings near the middle zone typically represent mixed or transitional behavior rather than strong directional consensus.

The panel state labels are designed to summarize that environment in plain language. The component rows below the headline score can help explain why the state is strong, weak, improving, or deteriorating.

In general, the oscillator is most useful when read together with price structure, trend context, and nearby technical levels, rather than in complete isolation.

LIMITATIONS AND TRANSPARENCY

This script is an analytical aid, not a predictive engine.

It does not know future price direction. It only evaluates the recent structural character of price action according to its own model. Like any momentum-based tool, it can react quickly during strong directional phases and become less reliable during noisy, event-driven, or highly erratic conditions.

Different symbols and timeframes can also produce different structural behavior. Users should expect to adjust settings where appropriate and validate how the oscillator behaves on the markets they follow.

The script is designed to provide a structured interpretation of momentum, but it should not be treated as a guarantee of continuation, reversal, or trade outcome.

RISK DISCLOSURE

This indicator is provided for chart analysis, research, and educational use only. It does not provide financial advice, investment advice, or guaranteed signals. All trading decisions remain the sole responsibility of the user. Technical indicators should be used with risk management and broader market context, not as standalone certainty tools.
Информация о релизе
UPDATE NOTES - V1.1

This update focuses on visual presentation, chart readability, and faster first-glance interpretation inside the oscillator pane.

The underlying purpose of AG Pro Structural Momentum Oscillator remains the same: it is a rules-based oscillator designed to organize structural momentum, directional bias, and component quality into a compact visual framework. This release does not change the script into a prediction tool, and it does not introduce a new analytical model. Instead, it improves how the existing framework is displayed and read on the chart.

What changed

• Added a softer visual structure for key oscillator zones
The upper expansion area, balance region, and lower expansion area are now easier to distinguish visually. This makes it simpler to identify where momentum is operating relative to expansion and neutral conditions without requiring constant panel reading.

• Added momentum cloud visualization
A soft fill between the main momentum line and the signal line has been added to improve immediate visual interpretation. This helps users assess whether momentum is pressing with or against the signal line in a more intuitive way.

• Improved panel presentation
The panel layout was refined to look cleaner and more compact on the chart. Spacing, row handling, and overall visual balance were adjusted so the panel communicates information more clearly without unnecessary visual weight.

• Improved default marker behavior
Marker presentation was streamlined so the default chart view stays cleaner while still preserving useful event information. The goal was to reduce visual crowding and improve chart legibility during routine use.

• Added current-state end tag
A right-edge tag was added so the latest structural momentum reading can be recognized more quickly at the current bar. This gives the chart a clearer “current condition” reference without changing the underlying score logic.

• Added current tag font-size control
A dedicated font-size setting was added for the current-state tag so users can better match the label size to their chart density and screen preference.

• Improved light-theme and general readability behavior
Visual elements were adjusted so the script remains easier to read across different chart appearances, especially when users prefer brighter chart backgrounds.

Methodology note

This update is primarily visual. The core structural momentum framework remains based on the same component logic already used by the script, including:
- close quality
- wick pressure
- impulse efficiency
- pullback control
- persistence

The purpose of this release is to improve chart communication, not to reframe the script’s analytical role.

Practical effect

In day-to-day use, the script should now be easier to scan quickly. Expansion conditions are easier to identify, the current reading is easier to locate, and the panel is cleaner. The intent is to make the oscillator more readable without adding unnecessary complexity.

Transparency

This release is presentation-focused. It does not claim to remove uncertainty, predict outcomes, or guarantee better trading results. Like any oscillator, the script should be interpreted within broader chart context, market structure, and user workflow.
Информация о релизе
AG Pro Structural Momentum Oscillator [AGPro Series] — Update Notes (V1.3)

This update focuses on presentation quality, panel consistency, and cleaner structural momentum reading without changing the core purpose of the script.

What changed in V1.3:
- Refined the panel layout for a cleaner top-right presentation.
- Standardized the header row into a single merged title row with the AG Pro visual format.
- Improved overall visual hierarchy inside the oscillator pane for easier reading.
- Reduced visual clutter in the event highlighting layer.
- Tuned the balance between momentum line visibility, background zones, and signal markers.
- Improved current-state readability on the right edge.
- Kept the script centered on structural momentum interpretation rather than signal overload.

Notes:
- This update is primarily a visual and usability refinement.
- The script remains an analysis tool designed to help read structural momentum conditions.
- It does not predict future price movement and should be used together with market structure, context, and risk management.
Информация о релизе
Structural Momentum Oscillator [AGPro Series] - v2.2 Update Notes

This update is a major visual refresh focused on premium readability. The underlying composite engine is unchanged; every change is aimed at making the reading cleaner, faster, and easier on the eyes.

What's new

• Regime Blocks inside the oscillator pane
When a strong expansion state persists for at least N confirmed bars, a clean horizontal block prints on the corresponding rail: bullish expansion near the top rail, bearish expansion near the bottom rail. Each block is anchored to the first qualifying bar and extends forward as the regime continues. Fully configurable (minimum bars, right padding, transparency, label on or off, label font size).

• Lighter, cleaner pane
Default transparencies have been raised so the core elements — the momentum line, the signal line and the regime blocks — stay the clear focal points. The previous state ribbon has been removed to avoid a barcode effect. The state background tint is now off by default.

• On-chart marker labels
Event markers use label-based rendering so they never get buried inside candle bodies. Font size is user-configurable with a default of Normal.

• Panel upgrades
Panel position is selectable across nine anchor points. A new Panel Theme input (Dark / Midnight) switches between the standard AGPro slate and a deeper midnight surface. The first panel row is a single merged title cell on the AGPro brand blue.

• Full AGPro color palette alignment
All states, fills, clouds, blocks and markers now use the unified AGPro palette: bullish #22C5A6, bearish #F472B6, neutral #F5BD5C, accent #818CF8, brand #2563EB.

• Cleaner marker logic
Default Visual Mode is Showcase, which keeps only qualified events (filtered by close quality, impulse efficiency, persistence and signal spread). Marker cooldown default raised to reduce clutter.

• Input organization
Inputs are now grouped into clearly labeled sections (Engine, Oscillator Visuals, Regime Blocks, Markers, Panel) with professional English tooltips throughout.

What's removed

• Legacy price anchor code.
• State ribbon strip.
• Default heavy pane-wide state tint.

Notes

• The core composite — close quality, wick pressure, impulse efficiency, pullback control, persistence — is unchanged and backward compatible in reading.
• Default thresholds (65 / 35) and windows (14 / 8 / 5) remain the same.
• All event detections use confirmed bar logic. Signals are calculated at bar close.

Not financial advice. This tool is a momentum and structural bias reader, not a strategy and not a buy or sell signal generator.
Информация о релизе
Update Notes - V2.3

This update refines the oscillator reading experience and adds a cleaner structural context layer without changing the core purpose of the script.

• Added a new Balance Band around the 50-line to make neutral compression and transition zones easier to read.
• Introduced Component Alignment logic and a new Alignment readout in the panel to show how well the internal momentum components are agreeing with the composite score.
• Tightened strong shift and strong expansion qualifications by requiring alignment confirmation, helping high-conviction events stand out more clearly.
• Expanded the panel with a dedicated Alignment row and refined panel lifecycle handling for cleaner behavior when panel position or theme settings are changed.
• Refined regime block labeling and default block label sizing for better readability inside the oscillator pane.
• Updated event, marker, and tooltip phrasing for a cleaner and more consistent structural-momentum presentation.
• Added a subtle Balance Band fill and kept the existing expansion-band structure for better visual separation between balance and directional expansion states.
• Refined the current state tag formatting and streamlined naming details in the updated release.

No future results are predicted. The script remains a structural momentum reading and alerting tool built for confirmed bar analysis.
Информация о релизе
🔧 UPDATE NOTES - v2.4

This update focuses on decision clarity and readability.

The core purpose of the script remains unchanged.
This release improves how the existing momentum engine is presented and interpreted in the pane.

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
------------------------

• New "Next Action" panel readout
The panel now translates the current state into a plain-language focus line: "Hold Bias - Bull Expansion" or "Hold Bias - Bear Expansion" during strong expansion, "Track Bull Momentum" or "Track Bear Momentum" during constructive phases, and "Wait - Compression" during neutral balance. The dashboard can be read at a glance without decoding raw values.

• Standardized short title
The chart short title now follows the AGPro Series naming convention.


------------------------
Visual Improvements
------------------------

• Refined panel visual hierarchy: the Next Action row is highlighted so the current focus stands out at first glance

• Improved panel information flow from state, to focus, to score, to component detail

• No changes to the oscillator line, signal line, momentum cloud, expansion bands, balance band, regime blocks, event pulses, markers, or the live state tag - the established pane presentation is preserved exactly

• Default visual settings remain balanced; existing user settings are preserved


------------------------
Interface & Usability
------------------------

• Optimized panel layout (State -> Next Action -> Momentum -> Bias -> Alignment -> Signal Spread -> components)

• Enhanced overall user experience without changing core logic


------------------------
Behavior Notes
------------------------

This update does not change the core analytical logic of the script.

The composite momentum engine, component scoring, expansion thresholds, regime blocks, markers, and alert conditions are identical to v2.3.

Users should interpret outputs the same way as before, but with a clearer reading order in the panel.


------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, and timeframe differences may affect how states appear.

Outputs should always be interpreted within broader market context.


------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or guaranteed trading outcomes.

Users remain responsible for their own decisions.
Информация о релизе
UPDATE NOTES - VERSION 2.5

This update focuses on panel readability, visual contrast, and light-theme usability.

The core purpose of the script remains unchanged.
This release improves how the existing panel information 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
------------------------

- Rebuilt the panel value-cell color system with opaque, contrast-safe backgrounds.
The previous semi-transparent state cells could blend into white chart themes and make text hard to read.

- Improved light-theme panel readability.
State, Next Action, Momentum, Bias, Alignment, Signal Spread, and component rows now stay readable on both dark and light TradingView themes.

- Preserved the existing AGPro visual identity.
The blue merged title row, dark panel surface, state-based color language, and compact information hierarchy remain intact.

- Updated the Panel Theme tooltip.
The setting now clearly explains that both panel themes use contrast-safe cells for dark and light chart themes.


------------------------
Visual Improvements
------------------------

- Improved chart readability by replacing pale blended panel cells with stronger opaque AGPro state cells.

- Reduced light-theme washout without changing oscillator colors, score logic, alerts, markers, or regime blocks.

- Refined visual hierarchy so the panel title, row labels, and live values remain separated at first glance.

- Preserved the single merged blue header row across the full panel width.


------------------------
Interface & Usability
------------------------

- Optimized panel layout readability for users who switch between dark and light TradingView chart themes.

- Improved value contrast while keeping the existing Panel Position, Panel Theme, Panel Mode, and Panel Font Size controls.

- Adjusted default visual behavior only where needed for readability.

- Enhanced overall user experience without changing core analytical logic.


------------------------
Behavior Notes
------------------------

This update does not change the core analytical logic of the script.

The goal is to improve clarity and usability, not to introduce new predictive behavior.

Users should interpret outputs the same way as before, but with improved panel contrast and stronger theme compatibility.


------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, and timeframe differences may affect how signals 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. Подробнее читайте в Условиях использования.