OPEN-SOURCE SCRIPT
Zaktualizowano

Sequential Exhaustion Tracker [AGPro Series]

916
Sequential Exhaustion Tracker [AGPro Series]

🔷 Overview

Sequential Exhaustion Tracker [AGPro Series] is a price-action based trend maturity tool built for traders who want to read how far a directional candle sequence has developed, when that sequence is becoming late-stage, and whether the market is more likely to recycle the move or fail back through its terminal zone.

The script is not an oscillator, not a crossover tool, and not a protected-brand sequential clone. It does not depend on classic overbought or oversold thresholds. Instead, it tracks qualified directional progress bar by bar, measures the quality of the active count, opens a visual exhaustion window when the run becomes mature, and then follows the next phase as either recycle, testing, or failure.

That makes the script useful for a very specific question:

Is the current directional run still building cleanly, or has it entered the kind of late-sequence area where follow-through, failure, and reset behavior need closer attention?

🔷 What The Script Measures

The engine combines four practical components:

1. Directional candle count
The script counts qualified progress candles in the active direction. A candle must show meaningful close-to-close progress, sufficient body commitment, and optional trend-filter alignment before it can advance the count.

2. Exhaustion threshold
The count becomes mature only after it reaches the selected threshold. This avoids treating every small move as exhaustion and keeps the tool focused on developed directional sequences.

3. Exhaustion quality
The quality model blends count maturity, ATR-normalized stretch from the baseline, opposing wick absorption, and body-efficiency fade. A high reading means the sequence is not only long enough, but also showing late-run characteristics.

4. Recycle/failure lifecycle
Once a qualified exhaustion window appears, the script continues tracking price behavior. Strong continuation through the terminal zone can classify the sequence as recycled. A break back through the zone can classify it as failed. This turns the indicator into a lifecycle tracker instead of a one-bar label generator.

🔷 Visual Design

The chart output is designed to stay premium and readable:

- Compact count labels use milestone-based defaults so the chart shows sequence progress without turning into a label wall.
- ATR-based label offsets keep labels away from candle bodies.
- Exhaustion zones are drawn as rectangular terminal windows, not generic support/resistance blocks.
- Recycle and failure markers are intentionally short and selective.
- Older labels and zones are automatically removed to protect chart performance.
- The summary panel uses the AGPro standard merged blue title row and a clean four-line state readout.

🔷 Panel Readout

The panel summarizes the active condition in a compact format:

Direction
Shows whether the current qualified run is bullish, bearish, or neutral.

Count
Shows the active sequential count against the selected exhaustion threshold.

Exhaustion Quality
Shows the maturity score and the current quality band.

Recycle Status
Shows whether the sequence is building, mature, testing an exhaustion window, recycling, recycled, failed, or waiting.

🔷 How This Differs From Other AGPro Scripts

This script is intentionally separated from AGPro oscillator exhaustion tools.

Stochastic Exhaustion Map focuses on stochastic behavior, momentum fatigue, and reset context inside an oscillator framework.

Williams %R Exhaustion Map focuses on Williams %R extension behavior and release-corridor logic.

Sequential Exhaustion Tracker focuses on the visible candle sequence itself: directional progress, count maturity, terminal exhaustion zone, and post-exhaustion lifecycle behavior.

It is also different from support/resistance reaction tools because the rectangles are not structural S/R zones. They are temporary terminal sequence windows created only when a mature count and exhaustion quality condition are present.

🔷 How This Differs From Common Sequential Count Scripts

Many sequential scripts focus mainly on printing a fixed count and stopping there. Sequential Exhaustion Tracker takes a different path.

It does not simply count bars for visual decoration. It asks whether the count is supported by meaningful directional progress, whether the run has become stretched relative to its own volatility, whether the candle structure is showing absorption, and what happens after the mature sequence appears.

The key difference is the lifecycle layer:

- Building sequence
- Mature count
- Exhaustion window
- Testing window
- Recycle build
- Recycled continuation
- Failed exhaustion window

This gives the script a cleaner analytical role than a basic numbered label tool.

🔷 Suggested Use

The script is best used as a chart-context layer for:

- identifying late-stage directional runs
- separating fresh continuation from mature extension
- watching terminal sequence zones
- studying continuation recycle behavior
- spotting failed late-run pressure
- keeping sequential count context visible without overcrowding the chart

It is designed to complement market structure, trend context, volatility conditions, and the trader's broader workflow.

🔷 Default Settings

The default settings are built for a balanced public-chart presentation:

- Count threshold: 8
- Quality threshold: 62
- Trend alignment: enabled
- Count label mode: Mature Milestones
- Count label start: 6
- Minimum label spacing: 8 bars
- Exhaustion zones: enabled
- Panel: enabled
- Label and panel font sizes: Normal

These defaults aim to keep the chart informative without turning it into a noisy label wall.

🔷 Why It Was Built

Directional markets often move in phases. Early movement can be clean and efficient. Middle movement can be supported and persistent. Late movement can still continue, but the character of the candles often starts to change.

Sequential Exhaustion Tracker was built to make that progression easier to read directly on the chart. The goal is not to call every top or bottom. The goal is to show where the current sequence sits in its own lifecycle and whether the post-exhaustion behavior is confirming continuation, stalling, or failing.

That narrow focus is what makes the tool distinct: it is not a general momentum dashboard, not an oscillator map, not a support/resistance engine, and not a signal checklist. It is a dedicated sequential maturity and lifecycle tracker.
Informacje o Wersji
UPDATE NOTES - V1.1

This update focuses on readability, visual hierarchy, label balance, panel structure, and clearer sequence exhaustion interpretation.

The core purpose of the script remains unchanged.
This release improves how the existing directional count and exhaustion-window 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
------------------------

* Reworked the exhaustion-zone visual system.
The script still maps directional candle progression, trend maturity, ATR-normalized stretch, wick absorption, body fade, recycle status, and failure status.

* Added centered labels inside exhaustion zones.
New exhaustion windows now include compact centered labels so the zone itself communicates direction and quality without relying only on external labels.

* Reduced default label density further.
Count labels now default to Threshold Only, and separate EXH event labels are disabled by default because the centered zone label already identifies the exhaustion window.

* Added an engine preset layer.
Swing / 4H is the balanced default, Daily Selective is cleaner and more selective, and Custom keeps direct control over the raw inputs.

* Added automatic sub-4H visual cleanup.
Charts below 4H now reduce count-label density and retained historical structures by default while the core exhaustion engine remains active.

* Updated panel standards.
The public script title does not start with AG Pro, while the panel title keeps AG Pro branding. The panel header remains a single merged blue row.


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

* Improved chart readability by adjusting count labels, exhaustion windows, lifecycle markers, bar highlights, and panel contrast.

* Reduced visual clutter to enhance first-glance interpretation.

* Refined visual hierarchy so building counts, maturity zones, recycled windows, and failed windows are easier to separate.

* Adjusted label placement to avoid overlap with candles by using ATR-based spacing.

* Added centered labels inside exhaustion-zone boxes.


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

* Optimized panel layout for clearer information flow.

* Added panel location, theme, and font-size controls while keeping the panel visible by default.

* Added configurable label font size with Normal as the default.

* Added a Best View panel row to guide users toward the intended 4H / 1D interpretation profile.

* Added Auto Clean Sub-4H View to keep low-timeframe charts from becoming visually crowded.


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

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

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

Users should interpret outputs the same way as before, but with improved visual structure, cleaner label density, centered zone context, and stronger panel clarity.

The automatic sub-4H cleanup affects visual density only. It does not disable the directional count or exhaustion-window engine.


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, timeframe compression, trend acceleration, and range-bound chop may affect how exhaustion windows and lifecycle markers 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.
Informacje o Wersji
UPDATE NOTES - Version 1.2

This update focuses on adding a confirmation-anchored proof layer to the tracker.

The core purpose of the script remains unchanged.
This release adds a proof layer that measures how often exhaustion windows produced a reversal
against the over-extended run, and removes the static best-view row.

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 a Proof Layer (Follow / Hold / React / Flip)
The panel now reports how exhaustion windows resolved on the current symbol and timeframe. Each
time a new exhaustion window opens, the over-extended run is tracked forward over a configurable
horizon, using the exhaustion zone as the structure (the continuation side of the zone is the
risk reference, and a reversal of one risk unit is the reference target):
- Follow Rate : share of windows where the run reversed by a full risk unit before continuing
- Hold Rate : share whose continuation side was not lost through resolution
- React Rate : share that produced an early reversal reaction against the run
- Flip Rate : share whose continuation side was lost, meaning the run recycled and extended
A sample size (n) is shown so the rates are read in context, and they display as "building" only
until the first window resolves.

* Removed the static best-view row
The best-view timeframe row was removed because it was a static reference rather than a live
decision input. The freed space now carries the proof layer.

* Added hidden proof outputs
Follow, Hold, React, and Flip rates are exported as hidden plots so they can be used in alerts
and screeners without adding chart clutter.


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

* Reduced panel redundancy by removing the static best-view row.

* Preserved the exhaustion zones, centered SELL/BUY EXH badges, count labels, recycle and fail
markers, the sequence baseline, and the sub-4H cleanup behavior.

* Kept label and structure density controlled with the existing spacing and retention limits.


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

This update does not change the core count, quality, exhaustion, or recycle/fail logic.

The proof rates are descriptive statistics of exhaustion windows on the current symbol and
timeframe. They measure how often the over-extended run reversed before continuing, and they do
not change how counts, quality, zones, lifecycle states, or markers are produced. Note that, for
an exhaustion tool, a higher Follow or React rate corresponds to runs that reversed (the fade
context worked), while a higher Flip rate corresponds to runs that recycled and continued.

Users should interpret outputs the same way as before, now with added reliability context.


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

The script remains a rule-based analytical tool.

Proof rates depend on the available history and on how many exhaustion windows occurred on the
current symbol and timeframe; a small sample (low n) should be treated with caution. Each window
is counted once, with the entry, continuation-side reference, and risk-unit target frozen at the
window-open bar. Market conditions such as volatility, liquidity, and timeframe differences may
affect how windows and rates 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.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.