INVITE-ONLY SCRIPT
Updated

Divergence Reversal Decision Matrix [AGPro Series]

341
Divergence Reversal Decision Matrix [AGPro Series]

🧠 Core Idea

Does a divergence setup have enough structure, momentum, and invalidation context to deserve reversal review?


📌 Overview / What it does

Divergence Reversal Decision Matrix [AGPro Series] is a divergence-based reversal workflow designed to organize active divergence context after a qualified pivot comparison appears. Instead of acting as a broad divergence scanner, it focuses on the current reversal-review environment around the latest qualified divergence.

The script maps divergence anchors, a reversal review zone, an invalidation rail, momentum context, stack strength, failure risk, readiness, and next-action state. The goal is to help traders separate raw divergence from a more structured reversal-review workflow.

This script does not predict future price direction, automate decisions, or provide guaranteed signals. It is an analytical and educational visualization tool for reviewing divergence context with structure, momentum, and invalidation awareness.


🎯 Purpose & Design Philosophy

Divergence is one of the most searched and widely used chart concepts, but raw divergence alone can be misleading. A divergence may appear while the trend is still strong, while momentum is not aligned, or while invalidation pressure is already rising.

This script was built for traders who want a cleaner decision-support layer after divergence is detected. It asks whether the divergence has enough surrounding context to review a possible reversal, rather than treating every divergence as equally important.

The design philosophy is simple:

• detect the active divergence context
• map the reversal review zone
• track momentum alignment
• show invalidation pressure clearly
• summarize readiness and next action in one panel

The script is intentionally workflow-based. It helps the user think through the setup instead of presenting a one-click answer.


⚡ Why This Script Is Different

Most divergence tools focus on finding as many divergence events as possible.

This script does NOT try to be another broad divergence scanner.

Instead, it focuses on active reversal decision context.

It combines:

• divergence anchor comparison
• stack strength
• reversal review zone
• momentum context
• invalidation rail
• failure-risk pressure
• readiness score
• next-action state

That makes the tool different from a pure scanner. It is not asking only, "Is there divergence?"

It asks:

"Is this divergence structured enough to review as a reversal context?"


⚙️ Methodology

1. Divergence Anchor Detection

The script compares confirmed price pivots against RSI pivot behavior. Bullish divergence appears when price forms a lower pivot while RSI forms a higher pivot. Bearish divergence appears when price forms a higher pivot while RSI forms a lower pivot.

2. Stack Strength

The script builds a stack-strength score from the primary divergence relationship and secondary momentum agreement. Stochastic and MACD histogram behavior are used as supporting context rather than separate standalone signals.

3. Reversal Zone Mapping

After a qualified divergence appears, the script builds an active reversal review zone around the divergence pivot. This is the area where reaction quality and follow-through context can be reviewed.

4. Momentum Context

The script evaluates recent RSI, MACD histogram, and EMA-relative behavior to estimate whether short-term momentum is beginning to align with the divergence idea.

5. Invalidation Rail

A dashed invalidation rail is plotted beyond the active divergence pivot. Pressure beyond this rail increases failure-risk context and can shift the workflow toward invalidation review.

6. Readiness Evaluation

Readiness combines stack strength, momentum context, freshness, zone interaction, confirmation behavior, and failure-risk pressure.

7. Visual Output

The script renders the active reversal zone, divergence anchor line, invalidation rail, centered zone badge, review label, stack label, historical state markers, and AGPro decision panel.


🗺️ How to Read the Chart

Divergence Anchor Line

The anchor line connects the previous price pivot and the current divergence pivot. It visually shows the structure behind the active divergence context.

Reversal Zone

The colored zone marks the active review area around the divergence pivot. It is not a command area. It is a structured context zone.

Invalidation Rail

The dashed invalidation rail shows where the divergence context begins to weaken materially. When price presses beyond this rail, failure-risk context increases.

Zone Badge

The centered badge summarizes the active side and workflow state, such as bullish divergence review, bearish divergence review, ready context, or invalidation review.

Panel

The panel summarizes the decision workflow:

• Divergence Type
• Stack Strength
• Reversal Zone
• Momentum Context
• Failure Risk
• Readiness
• State
• Next Action


🚦 Signals & States

• CONTEXT WATCH → Divergence context exists but is not yet strong enough for active review

• DIVERGENCE ACTIVE → A qualified divergence context is active

• REVERSAL REVIEW → Price is interacting with the reversal zone and readiness is improving

• REVERSAL READY → Readiness is high after stronger context alignment

• INVALIDATION REVIEW → Failure pressure or invalidation behavior is elevated

• State Shift → The workflow state changed

These states are attention markers. They are not trade instructions.


🔔 Alerts Logic

The script includes alert conditions for key workflow changes:

• Divergence active → A new qualified divergence reversal context is detected

• Reversal readiness high → Readiness reaches a stronger review state

• Failure pressure → Failure-risk context becomes elevated

• Invalidation review → The workflow shifts toward invalidation review

• State shift → The overall divergence reversal workflow changes

Alerts are designed to draw attention to analytical conditions. They do not instruct the user to take or close a position.


🧩 Confluence Logic

The strongest review context appears when several elements align:

• clean price-vs-RSI divergence
• supportive Stochastic behavior
• supportive MACD histogram behavior
• price interaction with the reversal zone
• improving momentum context
• controlled failure risk

When these conditions align, the matrix becomes more constructive. When momentum remains weak or invalidation pressure rises, the context becomes less favorable for reversal review.


📊 When to Use

This script is most useful when divergence and reversal context matter:

• potential exhaustion after extended moves
• lower-low price action with improving oscillator behavior
• higher-high price action with weakening oscillator behavior
• reversal-zone review after a confirmed pivot
• multi-timeframe divergence study
• situations where invalidation context must be visible

It can be used across symbols and timeframes, but it should be interpreted with liquidity, volatility, trend strength, and broader market structure.


⚠️ When NOT to Use

Avoid relying on this script in weak conditions such as:

• very low-liquidity markets
• extreme news-driven volatility
• highly fragmented sideways chop
• very low timeframes with excessive noise
• strong trend conditions where divergence repeatedly appears early
• markets where pivot confirmation is too slow for the user's workflow

Divergence is context-sensitive. It should not be treated as a standalone forecast.


🎛️ Key Inputs

Planner Mode

Controls whether the workflow evaluates bullish divergences, bearish divergences, or both automatically.

Pivot Confirmation

Controls the swing-confirmation window used for price and oscillator pivot comparison.

RSI Length

Controls the primary oscillator used for divergence detection.

Stoch Length

Controls secondary momentum agreement inside the stack-strength score.

Momentum Context Lookback

Controls how recent RSI, MACD histogram, and EMA-relative behavior are evaluated.

Stack Strictness

Controls how much secondary alignment is required before divergence becomes active.

Reversal Zone Depth

Controls the size of the review zone around the divergence pivot.

Failure Risk Strictness

Controls how quickly invalidation pressure increases.

Visual Preset

Controls chart annotation density.

Panel and Label Font Size

Controls readability for the panel and chart labels.


🖥️ Interface & Visual Design

The visual hierarchy is designed for first-glance clarity:

• divergence anchor line
• active reversal zone
• centered zone badge
• dashed invalidation rail
• compact review and stack labels
• AGPro decision panel

The panel uses a single merged AGPro header row with a blue background. Theme, location, and font-size controls are included so the panel can adapt to different TradingView chart layouts.


🧪 Practical Usage Workflow

1. Read the panel state

Start with State, Readiness, Momentum Context, and Failure Risk.

2. Check divergence type

Identify whether the active context is bullish or bearish divergence.

3. Review stack strength

Higher stack strength means the divergence has stronger supporting momentum context.

4. Inspect the reversal zone

Watch whether price interacts with the active review zone.

5. Watch invalidation pressure

If failure risk rises, the divergence context may be weakening.

6. Confirm with broader context

Use market structure, liquidity, trend quality, and independent risk planning before forming any decision.


🔍 Interpretation Guidelines

High readiness means the reversal-review workflow is stronger than usual. It does not mean a reversal is certain.

High stack strength means more supporting conditions are aligned. It does not remove risk.

Low failure risk means the invalidation rail is not under pressure. It does not guarantee follow-through.

Invalidation review means the divergence context requires caution and reassessment.

The best use of the tool is structured interpretation, not mechanical action.


🚫 What This Script Is NOT

This script is not a prediction engine.

It is not a signal service.

It is not an automated trading system.

It does not provide financial advice.

It does not guarantee outcomes.

It does not replace market context, risk management, or independent analysis.


⚠️ Limitations & Transparency

Divergence is a delayed, pivot-confirmed concept. A divergence marker can only be confirmed after enough bars have passed to validate the pivot.

Oscillator divergence can appear early in strong trends and may fail repeatedly if broader structure remains directional.

Readiness, stack strength, momentum context, and failure risk are rule-based analytical scores. They are designed to organize context, not to predict certainty.

Different timeframes and symbols may produce different divergence behavior. Users should interpret the output within the broader market environment.


🧠 Market Context Notes

Divergence often becomes more useful when it appears near structure, exhaustion, liquidity runs, failed continuation, or a clean reversal-review area.

It becomes weaker when the market remains strongly directional, when volatility is extreme, or when price structure does not support the reversal idea.

The most important question is not:

"Did divergence appear?"

The better question is:

"Does this divergence have enough structure, momentum context, and invalidation clarity to review?"


🧾 Use Case Examples

Example 1

Price forms a lower pivot while RSI forms a higher pivot. Stochastic and MACD histogram behavior also improve. Price returns to the reversal zone while failure risk remains low. The matrix may shift toward reversal review or reversal ready.

Example 2

Price forms a higher pivot while RSI forms a lower pivot, but momentum context remains weak and price does not interact cleanly with the reversal zone. The matrix may remain in context watch or divergence active.

Example 3

A divergence setup appears, but price quickly presses beyond the invalidation rail. The script raises failure-risk context and may shift toward invalidation review.


🧱 System Philosophy

Divergence Reversal Decision Matrix [AGPro Series] follows the AGPro workflow philosophy:

• detect the event
• map the active review area
• measure supporting context
• identify invalidation pressure
• summarize the next review state

The goal is not to make divergence louder.

The goal is to make divergence interpretation cleaner, more structured, and more transparent.


🔐 Non-Promise Statement

No divergence setup guarantees reversal.

No readiness score guarantees follow-through.

No invalidation rail can remove uncertainty.

This script is designed for analytical decision support, not certainty.


📉 Risk Disclosure

Trading involves risk, including the possible loss of capital.

This script is provided for educational and analytical purposes only.

It does not provide financial advice, investment advice, or guaranteed trading outcomes.

Users are responsible for their own decisions, risk management, and independent research.


📚 Educational Note

Use this script to study the difference between raw divergence and structured reversal context. The most useful insights often come from comparing stack strength, zone interaction, momentum alignment, and invalidation behavior across multiple timeframes.
Release Notes
UPDATE NOTES - V1.1

This update focuses on chart readability, state hierarchy, and workflow interpretation.

The core purpose of the script remains unchanged.
This release improves how the existing divergence reversal workflow is presented, organized, 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
------------------------

* Historical label discipline was refined.
State label spacing is now more selective, with a higher default score threshold and a longer cooldown window to reduce overlapping labels while keeping meaningful context visible.

* The active reversal zone label was upgraded.
The zone badge now combines divergence side, current state, readiness, stack strength, failure risk, and setup quality in one compact label centered inside the active zone.

* Invalidation context is clearer.
The fail rail label now includes ATR distance so users can understand the active invalidation reference with better proportional context.

* Panel information was expanded.
The panel now includes Bars Active and Setup Quality, helping users evaluate how fresh the divergence workflow is and how balanced the current context appears.

* State label hierarchy was refined.
Readiness, review, active, and invalidation states now use more distinct visual treatment so the chart is easier to scan.


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

* Improved chart readability by reducing repeated historical state labels.

* Refined the active reversal zone label so the most important workflow details are grouped in one place.

* Adjusted state label placement and filtering to reduce overlap with candles.

* Kept the divergence zone centered and visually connected to the active workflow.

* Preserved the clean AGPro panel header and dark/light panel theme controls.


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

* Added Bars Active to show how long the current divergence workflow has been active.

* Added Setup Quality as a composite readability score based on readiness, stack strength, failure risk, and momentum context.

* Improved label information density without changing the core analytical logic.

* Kept panel location, panel theme, panel font size, label font size, and panel visibility controls intact.


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

This update does not change the core divergence detection concept 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 visual structure and clearer active-state context.


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, and timeframe differences may affect how divergence 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.
Release Notes
🔧 UPDATE NOTES - v1.4

This update focuses on chart readability, label clarity, and presentation polish.

The core purpose of the script remains unchanged.
This release improves how the existing logic is presented, organized, 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
------------------------

• Streamlined on-chart labels
Removed redundant status labels that repeated information already shown in the panel, reducing visual noise around the active zone.

• Added a clear next-action cue
A single on-chart ACTION label now reflects the workflow's current next-step context, alongside the existing state summary.

• Repositioned the zone summary label
The main reversal-zone summary now sits in the clean forward area of the zone band, so it no longer overlaps price candles.

• Adaptive label text contrast
Label text now adjusts automatically for readability across all state colors, including lighter backgrounds.

• Internal cleanup
Removed unused code paths for a lighter, faster script.


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

• Improved chart readability by reducing duplicate labels around the reversal zone

• Reduced visual clutter to enhance first-glance interpretation

• Refined visual hierarchy so the state summary and next-action cue stand out clearly

• Adjusted label positioning to avoid overlap with candles


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

• Clearer information flow between the panel and on-chart labels

• Improved label text contrast for easier reading on every state color

• Kept a balanced default label density for a clean, premium appearance

• Enhanced overall readability without changing core 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.

Divergence detection, scoring, zones, and states behave the same as before, presented with improved visual structure.


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, and timeframe differences may affect how labels and zones 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.
Release Notes
UPDATE NOTES - 1.5

This update focuses on proof and decisiveness: adding a Reversal Rate layer that
shows how often past divergences actually carried price in the reversal direction,
and making the next-action readout speak in clear trade decisions.

The core purpose of the script remains unchanged. It still maps active divergence
anchors, reversal review zones, momentum context, invalidation pressure, readiness
and a next-action context.

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

- Reversal Rate proof layer
A new panel row reports the historical reversal rate of the divergences on the
chart: the share of past divergences after whose confirmation price traveled one
anchor-ATR in the reversal direction before the invalidation rail broke, with the
sample size (n). Each divergence is registered once at its confirmation bar - the
first moment it is actually visible - and same-bar conflicts resolve conservatively
as failures, so the statistic is an honest record of how divergences on this chart
typically resolved. The on-chart badge also carries the reversal rate once a sample
exists.

- Decision-language next action
The Next Action row and the on-chart action label now speak in trade decisions -
trade the reversal, prepare entry at zone, wait for trigger, abort / stand aside,
wait for divergence - instead of generic review prompts.

- Clean numeric readouts
All scores now display as plain numbers in both the panel and the on-chart badge.
Decorative gauge characters were removed for a cleaner, more professional read.

- Honest sampling
The Reversal Rate row stays greyed until enough divergences have resolved to read
it, so a thin sample is never presented as a strong result.


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

- Improved panel and badge readability with numeric-only score presentation.

- Reduced visual clutter while keeping the reversal zone, divergence line,
invalidation rail and history-label limits unchanged.

- Refined visual hierarchy so the verdict, the scores, the proof and the next
action each read clearly at a glance.


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

- Enhanced overall user experience while keeping panel theme, location and font
size fully adjustable, with the panel shown by default.

- All divergence-engine, visual and panel settings remain available and unchanged.


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

This update adds a reversal tracking layer and rewords the next-action readout.
The divergence detection, zone construction, scoring, states and labels are
unchanged.

The goal is to improve clarity, depth and usability, not to introduce predictive
behavior. The Reversal Rate describes how past divergences resolved within the
visible history and is not a forecast. Small samples should be read with care.


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

The script remains a rule-based analytical tool.

Reversal rates vary with timeframe, instrument, zone depth and settings. A
favorable reading does not guarantee any individual outcome.

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.
Release Notes
🔧 UPDATE NOTES - V1.5.1

This update focuses on confirmed-divergence integrity, reversal-zone sequencing, workflow timing, proof-layer completeness, and interface clarity.

The core purpose of the script remains unchanged.
This release improves how the existing divergence-reversal workflow is validated, tracked, 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
------------------------

• Confirmed divergence registration
New active divergences are now registered only after the pivot-confirmation bar is complete. An unfinished realtime candle can no longer temporarily replace the active divergence context.

• Authentic pre-divergence state
The matrix now displays AWAITING DIVERGENCE until a genuine confirmed divergence exists in the loaded history. It no longer renders a synthetic zone from fallback candle values.

• Corrected REVERSAL READY sequencing
REVERSAL READY now requires the active reversal zone to have been visited before a completed candle confirms away from it. A distant close alone can no longer create a false ready state.

• Corrected workflow age
Bars Active and freshness now begin at the divergence confirmation bar—the first moment the setup is actually visible—while the anchor line and zone still begin at the original pivot source.

• Complete Reversal Rate sampling
Confirmed divergences are now tracked independently, including overlapping samples. Each sample resolves through one-ATR follow-through, stored-rail failure, or timeout, with same-bar conflicts handled conservatively.

• Confirmed alert transitions
New-divergence and workflow state-shift alerts now use completed-bar confirmation.

• Neutral analytical review language
The chart badge and final panel row now use Current Review wording instead of direct trade-instruction language.


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

• Added a clean AWAITING DIVERGENCE presentation when no confirmed source exists

• Moved the Review and Fail Rail badges beyond the active zone projection for clearer separation

• Corrected the final panel-row contrast in the Light theme

• Preserved the anchor line, centered reversal-zone badge, projected zone, and dashed failure rail

• Preserved the teal bullish, pink bearish, indigo review, amber context, and red invalidation hierarchy


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

• Preserved the merged blue panel header containing only the script name

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

• Preserved Show Panel as enabled by default

• Preserved the existing Clean, Balanced, and Rich visual presets


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

This update does not change the price-versus-RSI divergence definition, Stochastic and MACD agreement rules, stack weights, reversal-zone depth models, invalidation distance, momentum formula, score weights, or core visual concept.

It corrects confirmation boundaries, zone-visit lifecycle ownership, active-age timing, Reversal Rate sample completeness, alert confirmation, and analytical wording. REVERSAL READY states, freshness, Bars Active, and Reversal Rate values may therefore differ from V1.5 where the earlier logic admitted unvisited-zone confirmation, counted the pivot-confirmation delay as active age, or skipped overlapping samples.

Reversal Rate remains descriptive evidence from resolved historical samples. It is not a forecast and should be interpreted cautiously when the sample size is small.


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, trend persistence, instrument history, and timeframe differences may affect how divergence states and reversal-rate samples 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.
Release Notes
🔧 UPDATE NOTES - V1.5.2

• Refreshed the publication and access routing information.
• Core divergence-reversal logic, panel behavior, inputs, alerts, visuals, and outputs remain unchanged.
Release Notes
🔧 UPDATE NOTES - V1.6.0

This update focuses on evidence integrity, panel hierarchy, and first-glance interpretability.

The core purpose of the script remains unchanged.
This release improves how historical reversal evidence is resolved, audited, and presented 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
------------------------

• Added an explicit Same-Bar Conflict policy
Historical samples that reach both the reversal target and invalidation rail on the same bar can now be excluded, resolved as invalidation-first, or resolved as target-first.

• Made Exclude the default conflict rule
Ambiguous same-bar outcomes no longer silently enter the resolved denominator as failures.

• Added a 90% Wilson lower confidence bound
The panel now shows both the observed reversal rate and a confidence-aware lower bound instead of relying on the raw rate alone.

• Refined timeout handling
A target reached on the final allowed tracking bar is counted before timeout, unless the same bar also creates a conflict governed by the selected audit rule.

• Added a product-specific core question
The panel now asks: “IS THIS DIVERGENCE READY FOR REVIEW?”


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

• Added a full-width analytical question directly below the blue title row

• Preserved the existing panel width and compact two-column hierarchy

• Replaced the Reversal Rate row with a concise Reversal Evidence readout
O = observed rate, LB = 90% lower bound, n = resolved samples, and A = ambiguous/excluded samples.

• Kept the active zone, review label, and failure rail visually separated


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

• Added a user-selectable Same-Bar Conflict input with a detailed tooltip

• Kept panel visibility, location, theme, and font-size controls unchanged

• Preserved label density and the current premium chart composition

• Improved evidence interpretation without adding promotional or predictive language


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

The core divergence detection, scoring, zone construction, state workflow, and alert logic remain unchanged.

Historical Reversal Evidence may differ from the previous release because ambiguous same-bar samples are excluded by default instead of being silently forced into failures.

Users who prefer a deterministic intrabar assumption can select Invalidation First or Target First.


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

The script remains a rule-based analytical tool.

Historical bar data does not reveal the exact intrabar order of target and invalidation touches. The Same-Bar Conflict setting makes that limitation explicit rather than hiding it.

Market conditions such as volatility, liquidity, and timeframe differences may affect how divergences and follow-through samples appear.


------------------------
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.
Release Notes
Version 1.7.0 – Owned Invalidation Rail and Divergence-State Clarity

This update strengthens the visual ownership and first-glance hierarchy of the existing divergence-reversal workflow. The core price-versus-RSI divergence engine, momentum stack, reversal zone, readiness, failure risk, conflict policy, confidence-aware evidence, and alert behavior remain unchanged.

• Centered the active decision card on the complete projected reversal-zone geometry for clearer zone ownership.

• Rebuilt the decision card into a concise four-line hierarchy covering divergence side, workflow state, readiness, stack strength, momentum, risk, setup quality, reversal evidence, and current review.

• Consolidated the separate REVIEW badge into the centered decision card to remove duplicated current-state messaging.

• Connected the displaced FAIL RAIL badge to its exact invalidation level with lifecycle-safe horizontal and vertical guides.

• Added the exact invalidation price to the FAIL RAIL badge and made its spacing responsive to projection length, zone depth, ATR, and the selected label font size.

• Reframed historical state markers as PRIOR DIVERGENCE events so older READY, REVIEW, INVALID, and ACTIVE labels cannot be mistaken for the current workflow.

• Positioned historical labels beyond a seven-bar candle cluster with font-size-aware ATR clearance.

• Converted the panel State value into a contrast-safe highlighted response cell for faster scanning.

• Preserved all five existing alert conditions and the complete analytical engine.

The script remains a rule-based analytical and visualization tool. It does not predict price direction, automate trading, provide financial advice, or guarantee outcomes.

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.