OPEN-SOURCE SCRIPT
Updated

AG Pro Support Resistance Reaction Map [AGPro Series]

6 965
AG Pro Support Resistance Reaction Map [AGPro Series]

Overview / What it does

This indicator maps horizontal support and resistance zones from confirmed price structure, then evaluates how price reacts when it returns to those zones. Instead of treating every level touch as equally important, the script focuses on whether the interaction looks constructive, weak, or potentially broken.

The core objective is to make structural reactions easier to read on-chart. Confirmed pivot highs and lows are converted into zones, nearby levels are merged, older levels can expire, and the chart prioritizes the most relevant active zones on each side of price. When price re-enters a zone, the script grades the reaction and can display labels such as Clean Hold, Sharp Reject, Soft Bounce, or Break Confirmed.

This publication is designed as an indicator, not as an execution engine. It does not place trades, predict future returns, or guarantee that a level will hold. Its purpose is to help traders organize structural context and evaluate reaction quality in a more systematic way.

Unique Edge

Support and resistance is a classic concept, so the difference here is not the concept itself but the workflow built around it.

This script is not a generic auto-drawing tool that tries to plot every possible line. It is a reaction map. The emphasis is on how price behaves inside a structural zone, not on covering the chart with as many levels as possible.

The script differs from tools that are primarily centered on pivot formulas, breakout-retest grading, moving-average reclaim logic, or channel structure. Here, the focus is horizontal structural memory and the quality of the live interaction with that memory. In practice, that means the script is trying to answer questions such as:

- Is this support still reacting constructively?
- Is this resistance rejecting cleanly or absorbing pressure?
- Is the latest touch just noise, or is it a more meaningful retest?
- Which nearby intact levels still deserve attention right now?

Another important distinction is the panel logic. The compact panel does not attempt to summarize all historical levels. It highlights the nearest intact support below price and the nearest intact resistance above price, along with their state, raw versus qualified touch count, and the latest recorded reaction.

Methodology

1) Structural level detection
Confirmed pivot highs and lows are used to create horizontal support and resistance zones. The script waits for confirmation rather than guessing unfinished pivots.

2) Zone construction
Each level is converted into a zone using an ATR-based width. This keeps the plotted area adaptable instead of forcing the same fixed width on all markets and all volatility environments.

3) Merge logic
Nearby levels of the same type can be merged when they fall within the selected merge distance. This helps reduce duplication and keeps the map cleaner.

4) Age and visibility control
Older levels can expire, broken levels can be hidden or faded, and the script visually prioritizes the nearest intact zones. This is intended to improve readability rather than preserve every historical level forever.

5) Reaction scoring
When price newly enters a live zone, the script evaluates the interaction using factors such as penetration depth, close location inside or outside the zone, candle body bias, impulse, and whether the touch is the first qualified retest. The result is translated into a reaction label and a quality score.

6) Touch accounting
The script tracks both Raw and Qualified touches. Raw touches represent zone entries. Qualified touches are stricter and require a fresh entry plus cooldown spacing, which helps avoid counting clustered bars as repeated independent retests.

Signals & Alerts

The script can generate labels and alerts around the most important structural interactions.

Main reaction labels:
- Clean Hold
- Sharp Reject
- Soft Bounce
- Break Confirmed
- Failure Risk

Main alert conditions:
- Bullish Level Reaction
- Bearish Level Reaction
- Level Break Confirmed

These labels and alerts are descriptive, not predictive. They summarize the current structural interaction detected by the script. They are not trade instructions and should not be interpreted as a promise of continuation or reversal.

Key Inputs

Levels
- Pivot Strength
- Maximum Active Levels
- Zone Width (ATR Multiplier)
- Merge Distance (ATR Multiplier)
- Level Expiry (bars)

Reaction Engine
- Retest Cooldown (bars)
- First-Touch Bonus
- Keep Broken Levels Visible

Visuals
- Show Reaction Labels
- Show Compact Panel
- Visible Zones Per Side
- Emphasize Nearest Levels
- Show Soft Bounce Labels
- Minimum Label Score
- Minimum Bars Between Side Labels
- Label Stagger (bars)
- Broken Level Fade
- Base Zone Opacity
- Label Offset (ATR)
- Label Size
- Panel Text Size

Panel
- Panel Location
- Panel Theme (Dark / Light)

Limitations & Transparency

- Pivot-based levels are confirmed after the selected pivot strength completes, so the script is intentionally reactive rather than anticipatory.
- Zone width is ATR-based, which means the visual footprint of levels will change with volatility.
- Raw and Qualified touch counts are intentionally different. Qualified touches are filtered by entry logic and cooldown, so they will usually be lower than raw counts.
- The compact panel is selective. It shows the nearest intact support and the nearest intact resistance, not a full inventory of every level on the chart.
- Visibility controls are designed to keep the chart readable. As a result, some valid but lower-priority levels may be de-emphasized or hidden from the main view.
- Support and resistance remains interpretive by nature. No horizontal level works in isolation across all symbols, timeframes, or market regimes.

Risk Disclosure

This indicator is a chart-analysis tool. It is not a broker, a signal service, or an automated trading system. It does not provide investment advice and it does not guarantee that any level will hold, reject, or break in a particular way.

All markets involve risk. Price can invalidate a structural zone quickly, especially during news events, regime shifts, or low-liquidity conditions. Use the script as one part of a broader decision process that includes market context, liquidity conditions, timeframe alignment, and risk management.

Release Notes
Update Notes - V1.4

This update refines the visual hierarchy and presentation of the script while preserving the original support and resistance reaction framework.

What changed:
- Reworked the compact panel layout with a cleaner first-row title structure for better readability.
- Improved the visual balance between primary and secondary support/resistance zones.
- Restored upper resistance context in a lighter secondary form so the chart keeps more structural memory without becoming cluttered.
- Tuned zone visibility to keep candles and price action easier to read.
- Refined the relationship between active zones, secondary zones, and reaction labels for a cleaner chart presentation.
- Reduced unnecessary visual noise from less relevant historical elements.
- Preserved nearby reaction context while keeping the overall layout more compact and easier to scan.

Notes:
- This script highlights support and resistance reaction areas based on its internal detection and reaction logic.
- Zones and labels are analytical aids and should be interpreted in context with market structure and price action.
- The script does not predict future price movement and does not provide trade guarantees.

Risk Disclosure:
This indicator is for chart analysis and educational use only. It is not financial advice.
Release Notes
UPDATE NOTES - V2.0
Version 2.0 is a major upgrade of the script, not a cosmetic refresh.
This update expands the indicator into a structural memory model. Instead of only plotting pivot-based support and resistance zones and labeling the latest touch, the script now measures three live dimensions for every active zone:
- Memory: how much structural relevance the zone still carries after age, reactions, and decay.
- Pressure: how much opposing order flow has accumulated inside the zone.
- Flip Risk: how vulnerable the zone is to changing role on the next meaningful interaction.

What changed in this update:

- Reworked the core concept from a simple reaction map into a structural memory engine.
- Added fixed birth-time ATR zone sizing so historical zones keep their original footprint instead of reshaping with later volatility.
- Introduced a birth-quality score based on pivot departure and wick behavior, giving stronger zones more initial authority.
- Added live Memory, Pressure, and Flip Risk tracking for each active zone.
- Upgraded reaction classification to highlight cleaner decision states such as Impulse Reject, Defended, Flip Watch, and Flip Confirmed.
- Rebuilt the visual hierarchy so the nearest active zones command attention while older or lower-priority areas fade into the background.
- Redesigned the panel into a premium dashboard with nearest support and resistance, live state, memory, pressure, flip risk, and last event.
- Improved label spacing and ATR-based vertical placement so annotations stay visible without crowding the candles.
- Preserved non-repainting pivot confirmation logic while tightening object management for cleaner performance.

Why this update is different:

This script is no longer trying to compete as a generic support/resistance drawer, a break-retest grader, a session reaction tool, or a volume shelf study. Its edge is structural memory management. It is designed to help traders answer a more specific question:
"Is this zone still respected because it truly carries memory, or is pressure building toward a role flip?"
That framing makes the tool more selective, more readable, and more useful for discretionary traders who care about decision quality, not chart clutter.
Release Notes
UPDATE NOTES - V2.1

Version 2.1 is a presentation and identity refinement update built on top of the stronger reaction engine introduced in the previous release.
This follow-up update keeps the smarter internal reaction framework, but brings the script back closer to its original support and resistance reaction-map identity. The goal is simple: preserve the added intelligence while making the tool feel more familiar, cleaner, and more naturally aligned with how traders read structural reactions on chart.

What changed in this update:

- Refined the script language so the indicator reads more clearly as a support and resistance reaction map.
- Renamed the key panel metrics to Strength, Pressure, and Break Risk for faster interpretation.
- Reworked reaction terminology into cleaner structural labels such as Sharp Reject, Clean Hold, Break Risk, and Break Confirmed.
- Tightened the alert titles and messages so they align more naturally with support, resistance, and level-break workflows.
- Updated the intro messaging to position the new scoring layer as an enhancement to the original concept rather than a separate product direction.

Why this update matters:

The previous upgrade added more depth to the model, but this pass improves how that depth is communicated. Instead of feeling like a different indicator concept, the script now presents its upgraded logic through more familiar support and resistance language.
That makes the tool easier to adopt for existing users, more cohesive as a public release, and better aligned with the original identity of the script while still preserving the premium reaction-quality engine under the hood.
Release Notes
🔧 UPDATE NOTES - V2.2

This update focuses on reaction lifecycle clarity, active-level decision context, and cleaner risk / target interpretation.

The core purpose of the script remains unchanged.
This release improves how support and resistance reactions are scored, displayed, 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
------------------------

• Public title updated to the current AGPro Series naming standard
The script title now uses "Support Resistance Reaction Map [AGPro Series]" while the panel keeps the AG Pro brand title.

• Added active-level reaction decision panel
The panel now focuses on the closest active reaction level, its 0-100 reaction score, defense state, freshness, risk / target context, and next-action state.

• Added risk, target, and invalidation context
The active level now estimates an invalidation edge and target room using the opposite reaction zone when available, with an ATR fallback when no opposite zone exists.

• Added centered lifecycle tags inside visible zones
Visible support and resistance zones can now show compact centered tags such as Support / Reactive or Resistance / Break Risk.

• Refined label defaults for better chart presence
Reaction labels are slightly more available by default while still using spacing, cooldown, and score filters to avoid crowded visuals.


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

• Improved chart readability with centered zone lifecycle tags

• Refined visual hierarchy around the nearest active support or resistance level

• Kept the premium merged blue panel header as the first row

• Adjusted default label behavior to create a fuller chart without turning the script into a noisy S/R plotter


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

• Optimized the panel layout around decision-first fields

• Added clear Action output: Wait for retest, Read defense, Evaluate reaction, Wait for defense, or Room limited

• Added adjustable centered zone tags through the Visuals settings

• Preserved configurable panel location, panel theme, label size, and panel font size


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

This update does not turn the script into a generic support / resistance plotter.

The core reaction-map identity remains the same.
The update adds a stronger decision layer around active level quality, freshness, invalidation distance, and target room.

Users should interpret outputs as structured context markers, not as automatic trade instructions.


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

The script remains a rule-based analytical tool.

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

Support and resistance reactions 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.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.