Pymander's EZ Breakout FinderThe Momentum Breakout Highlighter is a versatile price-action tool designed to identify high-conviction breakout candles. Unlike standard breakout indicators that trigger on any breach of a high or low, this script uses a multi-layered filtering system to ensure that signals represent genuine market commitment rather than "noise" or low-volume fakeouts.
How It Works
The script monitors a user-defined lookback period to establish local resistance (highs) and support (lows). A signal is generated only when three distinct conditions are met:
The Breakout: Price must breach the highest high or lowest low of the lookback period. Users can choose whether this requires a Wick breach or a full Close beyond the level.
The Momentum Filter: The candle’s body size (Open to Close) is compared against the average body size of the lookback period. A signal only triggers if the candle shows "effort"—meaning its body is significantly larger than the recent average.
The Trend Context: Signals are filtered via a Volume Weighted Moving Average (VWMA). By default, it follows the trend (Longs above VWMA, Shorts below), but it also includes a Mean Reversion Mode for contrarian traders.
Key Features
Momentum Verification: Uses an adjustable multiplier to ensure breakout candles have the necessary "thrust" to sustain a move.
Mean Reversion Mode: A unique toggle that flips the trend logic, allowing you to find high-momentum exhaustion moves back toward the VWMA.
Advanced Signal Management:
Cooldown Timer: Prevents "signal clustering" by requiring a set number of bars to pass before a new signal can trigger.
Opposite Direction Filter: An optional mode that forces signals to alternate between Bullish and Bearish, perfect for swing traders looking for "one-way" entries.
Visual Clarity: Features bar highlighting, triangular plotshapes (arrows), and optional reference lines for the previous high/low levels.
What Makes It Stand Out?
Most breakout indicators fail during choppy markets because they lack a volatility component. This script solves that by integrating Body-to-Average momentum logic. By requiring the "breakout" candle to be larger than its predecessors, it filters out "exhaustion wicks" and low-liquidity drifts.
Furthermore, the inclusion of VWMA Trend Bias ensures you are always trading with volume-weighted support, and the Cooldown/Directional filters make it an excellent tool for automating alerts without being overwhelmed by repetitive signals during high-volatility spikes.
How to Use
For Trend Following: Use the default settings to catch high-momentum entries in the direction of the trend.
For Mean Reversion: Enable "Mean Reversion Mode" to catch "Blow-off tops" or "Panic bottoms" that break local ranges against the primary trend.
For Scalping: Lower the lookback period and cooldown for faster signals on lower timeframes.
Good luck and enjoy!
Indicator

Z-Score Mean Reversion ProZ-Score Mean Reversion Pro is a Strategy designed to identify high-probability mean reversion setups by combining statistical Z-Score extremes with RSI momentum confirmation, Bollinger Band volatility filtering, and EMA trend alignment. It provides clean buy/sell signals, visual trade zones, dashboard data, and alert outputs to assist in short-term reversal trading, intraday setups, and swing mean reversion trades.
🔑 FEATURES
Z-Score Mean Reversion Engine: Detects statistically stretched price moves and highlights potential reversal zones when price deviates too far from its rolling mean.
Multi-Layer Signal Confirmation: Combines RSI exhaustion, Bollinger Band Width volatility checks, and EMA trend filtering to reduce false signals and improve trade quality.
Built-In Risk Management: Includes ATR-based stop loss and take profit logic, plus optional mean reversion exits when price returns toward equilibrium.
⚠️ NOTES & DISCLAIMERS
This script works best on 5m, 15m, 1H, and 4H charts across Forex, Crypto, Indices, and liquid Stocks.
Best suited for mean reversion traders looking to capture exhaustion moves and short-term reversals.
ATR exits are ideal for structured risk management, while Z-Score exits are better for pure statistical reversion setups.
Always use risk management (Stop Loss).
This script is for educational and research purposes only. Always forward test before using live capital.
Strategy

AlphaQuant Statistical Intelligence█ ALPHAQUANT STATISTICAL INTELLIGENCE (QSI)
Quantitative Market Quality Analysis
A quantitative market analysis tool that measures the statistical "quality" of market conditions using three core modules: Hurst Regime Engine , Shannon Entropy Flow , and Price Efficiency Ratio . These combine into a single QSI Composite Score (0-100) that rates whether current conditions are favorable for trading or not.
Free and Open Source.
█ THE CONCEPT: WHY STATISTICAL MARKET QUALITY MATTERS
Most indicators answer "which direction?" — QSI answers a different question: "Should I be trading right now?"
Markets alternate between regimes: trending, mean-reverting, chaotic, and efficient. QSI identifies these regimes in real-time so you can adapt your strategy accordingly. A trending Hurst regime favors breakout strategies. A mean-reverting regime favors fading. High entropy means the market is chaotic — reduce size. High efficiency means clean directional moves — increase conviction.
█ CORE MODULES
1. Hurst Regime Engine
Calculates the Hurst Exponent via Rescaled Range (R/S) analysis — a robust statistical method from hydrology adapted for financial markets.
H > 0.55 — Trending regime. Price has "memory" — breakout/trend-following strategies work well.
H = 0.50 — Random Walk. No statistical edge — the market is coin-flipping. Reduce size.
H < 0.45 — Mean-Reverting regime. Price has "anti-memory" — fade strategies work well.
2. Shannon Entropy Flow
Measures the information entropy of the return distribution using the Shannon Entropy formula from information theory.
High Entropy (>70) — Returns spread across many bins = chaotic, unpredictable. Reduce exposure.
Low Entropy (<30) — Returns cluster in few bins = ordered, predictable. Good for systematic strategies.
3. Price Efficiency Ratio
Measures directional efficiency by comparing net price movement to gross price movement over N bars.
High Efficiency (>30%) — Price moving cleanly in one direction. Trend-following conditions.
Low Efficiency (<10%) — Price chopping with no net progress. Avoid or use range strategies.
█ QSI COMPOSITE SCORE
The three modules combine into a single 0-100 score with fixed weights:
Hurst Edge: 40% — How strong is the regime signal?
Inverse Entropy: 35% — How ordered is the market?
Efficiency: 25% — How clean are the price moves?
Score interpretation:
> 70 — PRIME — Optimal conditions, full conviction
55-70 — FAVORABLE — Good conditions, normal sizing
40-55 — NEUTRAL — Mixed signals, proceed with caution
25-40 — CAUTION — Poor conditions, reduce size
< 25 — AVOID — Worst conditions, stay out
█ DASHBOARD
A compact, dark-themed info panel displaying:
QSI INDEX — Current composite value with regime label
HURST — Current Hurst exponent with regime classification
ENTROPY — Current entropy score with regime classification
EFFICIENCY — Current efficiency ratio with regime classification
WEIGHTS — Module weight distribution (H:40 E:35 F:25)
█ ALERTS (8 CONDITIONS)
QSI: PRIME Conditions — Composite entered prime zone (>70)
QSI: AVOID Conditions — Composite dropped to avoid zone (<25)
QSI: Conditions Improving — Composite crossed above 55
QSI: Conditions Deteriorating — Composite dropped below 40
QSI: Hurst → Trending — Hurst crossed above 0.55
QSI: Hurst → Mean-Reversion — Hurst crossed below 0.45
QSI: Entropy → Chaos — Entropy spiked above 70
QSI: Entropy → Order — Entropy dropped below 30
█ PRO VERSION
The PRO version adds:
Markov Transition Probabilities — Statistical prediction of next-bar direction
Correlation Intelligence — Auto-benchmark correlation with breakdown detection
Fractal Dimension — Higuchi fractal complexity analysis
Absorption Detection — High volume + low range = institutional activity
Trading Style Presets — Auto/Scalping/Daytrading/Swing/Position
Asset Auto-Optimization — Automatic parameter tuning per asset class
Profile-Adaptive Weighting — Dynamic composite weights based on style + asset
█ NON-REPAINTING
All calculations use confirmed bar data only. The Hurst Exponent is calculated from historical log-returns. Shannon Entropy uses a rolling window of past data. Price Efficiency uses closed bars only. No future data leakage. No repainting.
█ WORKS ON
Crypto, Forex, Stocks, Futures, Indices — any timeframe from 1 minute to Monthly.
█ DISCLAIMER
This indicator is for educational and informational purposes only. It does not constitute financial advice. Always do your own research and manage your risk. Past performance does not guarantee future results. Trading involves substantial risk of loss.
Indicator

VWAP Cross Flow Engine [AGPro Series]VWAP Cross Flow Engine
🔹 OVERVIEW
VWAP Cross Flow Engine is a precision scoring system for price-to-VWAP
crossovers. Instead of treating every VWAP cross as a binary signal,
this indicator measures the QUALITY of each crossover event in real
time using a weighted composite score derived from momentum, volume
expansion and optional sigma-band confluence. The engine is designed
for intraday scalpers and swing traders who rely on VWAP as a dynamic
equilibrium reference and need a structured way to separate high-
conviction continuation crosses from low-quality noise flips.
The script plots an anchored Volume-Weighted Average Price line with
optional volume-weighted standard-deviation bands, detects every
price/VWAP crossover event, scores each one on a 0–100 scale and
visualizes the result through compact X markers, directional bar
coloring, a retrospective quality dashboard and a dynamic bias zone
anchored on the strongest crosses.
🔸 UNIQUE EDGE
Most VWAP-based tools stop at plotting the line and marking raw
crossovers. VWAP Cross Flow Engine adds a multi-factor quality layer
on top of the crossover itself:
• Every cross receives a composite score, not a pass/fail flag
• Momentum sub-score derived from RSI distance from 50 at cross bar
• Volume sub-score derived from current volume vs SMA baseline
• Optional confluence bonus when cross occurs beyond 2-sigma envelope
• Retrospective follow-through measurement in ATR units
• Session-aware counters with automatic daily-vs-higher-timeframe
label switching
• ATR-based cooldown filter that prevents label overlap on any
timeframe, not just bar-count cooldowns that fail on daily charts
The combination of live scoring + retrospective success tracking in a
single panel is the core differentiator. It allows the trader to both
filter new crosses and study the historical reliability of VWAP cross
behavior on any symbol and timeframe.
🔷 METHODOLOGY
1. VWAP CALCULATION
Volume-weighted average of HLC3 (configurable) anchored to the
Session, Week or Month boundary. Cumulative price*volume and
cumulative volume series are reset at every anchor change.
2. SIGMA BANDS (optional)
Volume-weighted variance computed as E − E ² where X is the
source price weighted by volume. Square root produces the true
volume-weighted standard deviation. 1σ and 2σ envelopes are drawn
around the VWAP line.
3. CROSS DETECTION
Standard ta.crossover / ta.crossunder between close and VWAP.
4. QUALITY SCORING
• Momentum sub-score: |RSI(14) − 50|, scaled to 0–40 range
• Volume sub-score: volume / SMA(20), capped at 3x, scaled 0–30
• Confluence bonus: +5 if prior bar touched the opposing 2σ band
• Total live score (max 70 or 75) is rescaled to 0–100
5. COOLDOWN FILTER
A new cross is only plotted if BOTH conditions are met:
• At least N bars since the last plotted cross
• At least K × ATR price distance from the last plotted cross
6. FOLLOW-THROUGH TRACKING
Each cross is stored with its direction, price and ATR at the time
of the event. After N bars, the displacement (in the cross
direction) is measured. Success rate and average follow-through
in ATR units are maintained inside a rolling lookback window.
7. QUALITY ZONE
A rectangle zone (0.8 × ATR tall by default, 60 bars long) is
drawn at every strong cross (score ≥ 70). The zone acts as a
dynamic bias area anchored on high-conviction VWAP interactions.
🔶 SIGNALS & ALERTS
The indicator fires five distinct alert conditions:
1. High-Quality VWAP Cross Up — bullish cross above the min quality
threshold with cooldown satisfied.
2. High-Quality VWAP Cross Down — bearish cross above the min quality
threshold with cooldown satisfied.
3. Strong VWAP Cross (≥70) — score 70 or higher; anchors a new
quality zone.
4. Price Reached +2σ Band — price extended to the upper sigma band
(optional, requires bands enabled).
5. Price Reached −2σ Band — price extended to the lower sigma band
(optional, requires bands enabled).
🔹 KEY INPUTS
VWAP Reference
• Source — price series used for VWAP (default HLC3)
• Anchor Type — Session / Week / Month
• Show VWAP Line
Sigma Bands
• Show Sigma Bands (default OFF)
• Inner Band Multiplier (default 1.0)
• Outer Band Multiplier (default 2.0)
Quality Engine
• Momentum (RSI) Length
• Volume Average Length
• Follow-Through Bars
• ATR Length
• Min Quality To Plot (default 50)
• Use Sigma Confluence Bonus
• Cooldown — Minimum Bars (default 5)
• Cooldown — Minimum ATR Distance (default 0.5)
Visuals
• Show Cross X Labels
• Show Target Projection (default OFF)
• Show Quality Zone
• Quality Zone Height (ATR) / Length (Bars)
• Color Bars By Cross Strength
• Auto Label Size (upscale on 1D+)
Panel
• Show Dashboard Panel
• Panel Position (6 positions)
• Panel Theme (Dark / Light)
• Panel Font Size
• Success Rate Lookback Bars
🔸 HOW TO USE
• INTRADAY SCALPING — use Session anchor on 5m–1h charts. Focus on
crosses scoring 70 or higher. The quality zone becomes a short-term
bias area: price holding above a bull zone mid-line tends to favor
continuation, breaks back through the mid-line tend to indicate
weakening conviction.
• SWING BIAS — use Week or Month anchor on 4h and daily charts. Treat
strong crosses as potential regime-shift events. Monitor the
Success Rate metric to calibrate expectations for the current
market and instrument.
• MEAN-REVERSION — enable sigma bands and confluence bonus. Crosses
that form after a 2σ stretch tend to score higher and mark
statistically meaningful reversal attempts.
• FILTER CALIBRATION — raise Min Quality To Plot to 60 or 70 for
high-selectivity environments; lower to 40 for noisier instruments
where you want earlier confirmation.
The dashboard gives at-a-glance context: how many crosses have fired
this session, how many were strong, what the historical win rate
looks like in the current lookback window, the average ATR-normalized
follow-through, and whether price is currently above or below VWAP.
🔷 LIMITATIONS & TRANSPARENCY
• This is NOT a strategy and does not generate buy/sell orders.
• Score is a quality filter, not a directional prediction. A high-
score cross still carries market risk and can fail.
• Follow-through statistics depend on lookback window size and
timeframe; adjust Success Rate Lookback to match your trading
horizon.
• Sigma bands require a reliable volume feed. On low-liquidity
instruments the bands may be noisy or meaningless.
• Anchored VWAP resets at each new anchor (Session / Week / Month);
early-in-anchor values use fewer samples and are less stable.
• The indicator repaints only within the cross bar itself (like any
crossover detector). Once a bar closes, the plotted cross and its
score are fixed.
🔶 RISK DISCLOSURE
This script is a technical analysis tool intended for educational
and analytical purposes. It does not constitute financial advice,
investment advice or a recommendation to buy or sell any asset.
Trading financial markets involves substantial risk of loss. Past
performance of any indicator is not indicative of future results.
Users are fully responsible for their own trading decisions and
should combine this tool with independent analysis and proper risk
management. Indicator

Swap Engine - Pair Rotation (Z-Score) [AGPro Series]Swap Engine - Pair Rotation (Z-Score)
🔷 OVERVIEW
Swap Engine - Pair Rotation (Z-Score) transforms the log-ratio between two correlated crypto assets into a disciplined tier ladder decision framework. Rather than signalling single-asset direction, the engine measures how stretched one pair has become relative to its rolling mean and proposes rotation between the two assets when the spread reaches statistically meaningful extremes. Every decision is evaluated on confirmed Engine TF bar close, keeping suggestions non-repainting under the configured execution model.
🟣 UNIQUE EDGE
Unlike single-symbol mean-reversion or trend indicators, this engine treats the ratio itself as the tradable variable and pairs it with a full operational stack: a tiered exposure ladder (T0 to T3), an Integrity Gate that blocks entries when the pair relationship deteriorates, a Trend Regime filter that respects persistent one-sided moves, and a confirm-first execution model that converts raw signals into auditable decisions. A dedicated Signal Quality score (Q 0-100) and Integrity Score (IN 0-100) make every suggestion inspectable, not a black box.
🟢 METHODOLOGY
The engine fetches the closing price of Pair A and Pair B on the chosen Engine TF, computes the log-ratio L = ln(A / B), then derives a rolling z-score using user-defined lookback length. Entry thresholds (Z1, Z2, Z3) define the three tiers of exposure; exit thresholds (hysteresis) define when each tier is scaled back. A cost filter requires the expected mean-reversion edge to exceed a configurable multiple of estimated roundtrip cost before any entry is allowed. The Integrity Gate continuously validates rolling return correlation, ratio drift, and spread-volatility expansion, halting new entries when the pair relationship degrades.
🟡 SIGNALS & ALERTS
Each signal renders as a clearly tagged label on chart showing the action type (ENTRY / EXIT), source tier, target tier, direction (A->B or B->A), z-score snapshot, delta %, and Reason Code. Alerts are provided for: entry and exit events per direction, pending lifecycle (created, confirmed, skipped, expired), trend regime activation edges, duplicate suppression, and configuration warnings. All alerts fire on Engine TF bar close to remain consistent with the visible suggestions.
⚙️ KEY INPUTS
Pair A / Pair B: the two assets to rotate between (same quote currency recommended).
Engine TF: timeframe used for all ratio, z-score, and decision logic (240 / 4H default).
Lookback: bars used for rolling mean and standard deviation.
Entry Z1/Z2/Z3, Exit Z1/Z2/Z3: tiered thresholds for scaling in and out.
Tier Sizing (T1 / T2 / T3 %): rotation size per tier as a percentage of the active pool.
Trade Profile: preset gate behavior (Conservative, Balanced, Aggressive, Volatile Alt, High-Cost, Custom).
Integrity Gate: correlation, drift, and volatility expansion filter with configurable minimum score.
Execution Model: ASSUME (auto-advance), CONFIRM (pending + manual commit), or SIGNAL_ONLY (display only).
🔵 HOW TO USE
Start on the default BTCUSDT vs ETHUSDT pair on 4H Engine TF with the Balanced profile. Keep the chart timeframe equal to or lower than the Engine TF (the script warns otherwise). Watch the status panel for the current tier, direction, confidence strip (Q / IN / PH), and next action preview. In CONFIRM mode, a PENDING card appears when a signal fires; increase CONFIRM +1 to commit the rotation state, or SKIP +1 to discard. Use the Trade Profile dropdown to tighten or loosen effective gates without changing your base inputs.
🟠 LIMITATIONS & TRANSPARENCY
This is an indicator, not a strategy; no orders are placed and no backtest statistics are produced. Signals reflect statistical extremes in the pair's log-ratio and do not guarantee mean reversion. Performance depends heavily on pair selection - assets with persistent trends, broken correlation, or structural regime changes can cause extended adverse periods. The Integrity Gate mitigates but does not eliminate this risk. Costs, slippage, tax, and execution details are the user's responsibility; the Min Edge x filter is an estimate, not a realized-cost guarantee. Always validate on your own pair, timeframe, and account conditions before relying on any suggestion.
🔴 RISK DISCLOSURE
Trading and rotating between crypto assets involves substantial risk, including loss of capital. Past or simulated behavior of the ratio does not guarantee future results. This tool is shared for educational and analytical purposes only and does not constitute financial, investment, or trading advice. Users are solely responsible for their own decisions and should consult a qualified professional before committing capital. Indicator

Percentile Stretch Bands [AGPro Series]Percentile Stretch Bands
🔹 OVERVIEW
Percentile Stretch Bands is an empirical, distribution-free overextension map. Instead of plotting standard deviation envelopes that assume a normal distribution of price behavior, this indicator samples the actual historical distance between price and a chosen reference (EMA, VWAP, or Anchored VWAP) and draws context-specific Stretch and Extreme bands directly from the empirical percentile distribution. The result is a visual reference of how stretched price is relative to its own historical behavior, adapted to the asset and timeframe being viewed.
🔹 UNIQUE EDGE
Most "stretch" or "volatility band" tools on the platform rely on parametric assumptions — standard deviation multipliers, ATR multiples, or fixed percentage offsets. These approaches collapse when the underlying return distribution is skewed, fat-tailed, or regime-dependent, which is the rule rather than the exception across crypto and FX assets.
Percentile Stretch Bands takes a different path:
• Distribution-free: bands are drawn from the actual empirical percentile of price-to-reference distance, not from a Gaussian assumption.
• Side-specific sampling: upper and lower distances are collected into separate samples, so asymmetric behavior (trending markets, one-sided regimes) is preserved rather than averaged away.
• Regime-aware rendering: when Focus Active Side is enabled, each bar displays only the side relevant to price position, producing a clean single-story chart without visual competition.
• Readiness gating: bands appear only once a minimum number of observations is reached on the active side, with the status panel clearly indicating the collection stage.
🔹 METHODOLOGY
For every bar in the configured lookback window, the signed percent distance between close and the selected reference is computed and partitioned into two historical samples: positive distances (upper extensions) and negative distances in absolute terms (lower extensions).
Each sample is sorted and two percentile cut-offs are extracted independently:
• Stretch percentile (default 80) — the threshold beyond which a distance is considered materially extended.
• Extreme percentile (default 95) — the threshold beyond which a distance is statistically rare within the chosen lookback.
These cut-offs are then translated from percent-distance back into absolute price bands around the active reference, producing four levels: Upper Stretch, Upper Extreme, Lower Stretch, Lower Extreme. The current distance is also ranked against its side's sample and displayed as an ordinal percentile (for example, "Upper P87") in the status panel.
🔹 SIGNALS AND ALERTS
The indicator is a visual overextension map and does not generate directional trade signals. Four alert conditions are exposed for users who want to be notified of boundary events:
• Upper Stretch Cross — close crosses above the Upper Stretch band.
• Upper Extreme Cross — close crosses above the Upper Extreme band.
• Lower Stretch Cross — close crosses below the Lower Stretch band.
• Lower Extreme Cross — close crosses below the Lower Extreme band.
These alerts mark entries into statistically extended zones relative to the empirical sample. They are contextual flags, not trade recommendations.
🔹 KEY INPUTS
Reference
• Reference Mode — EMA, VWAP, or Anchored VWAP baseline
• EMA Length — smoothing length for the EMA reference
• AVWAP Anchor Time — starting timestamp for Anchored VWAP
Statistics
• Lookback — bars used to build the empirical distribution (default 500)
• Minimum Side Sample — observations required before bands appear
• Stretch Percentile — primary extension threshold (default 80)
• Extreme Percentile — rare-extension threshold (default 95)
Display
• Focus Active Side — regime-aware single-story rendering
• Show Active Stretch Zone Box — right-side zone anchor on the active side
• Zone Forward Projection — forward visibility of the active zone
• Band Color Profile — Soft, Premium, or Bold
• Panel Text Size and Label Text Size — Small, Normal, or Large
Level Tags
• Show Level Tags, Show Reference Tag, Tag Mode, Tag Offset Bars
🔹 HOW TO USE
1. Select a reference that fits the asset and timeframe. EMA is a robust default across all instruments. VWAP is suited to intraday equities and futures. Anchored VWAP is used when a specific event origin (earnings, news, structural low) is relevant.
2. Let the status panel reach the "Ready" state. The panel reports active samples and readiness — bands are intentionally withheld until the side-specific sample is sufficient.
3. Read the current percentile rank in the Zone cell. Values near the center indicate price trading close to the reference; values approaching P95 or above indicate the sample's rare extensions.
4. Treat Stretch and Extreme bands as context, not as triggers. A move into the Extreme zone reflects a statistically rare extension on the chosen sample, not a directional signal.
5. Combine with structural tools — trend context, market structure, higher-timeframe bias — before any discretionary decision.
🔹 LIMITATIONS AND TRANSPARENCY
• The indicator is descriptive, not predictive. Percentile bands describe past behavior within the lookback window; they do not forecast future price action.
• Regime shifts can temporarily invalidate historical bands. A sudden volatility expansion will push price beyond extreme levels while the sample re-stabilizes.
• Empirical percentiles require sufficient observations. On very new symbols or short lookbacks, the "Collecting" state is the correct and expected behavior.
• Anchored VWAP mode depends on a meaningful anchor choice. A poorly chosen anchor produces a reference line without structural relevance.
• The active stretch zone box is a visual anchor for screenshots and review, not a projection of future levels.
🔹 RISK DISCLOSURE
This script is a visual analytics tool and is not a strategy, signal service, or financial advice. It does not place orders, manage positions, or recommend directional exposure. Trading involves risk of loss. Users are responsible for their own analysis, risk management, and trading decisions. Indicator

Dynamic Acceptance Channel [AGPro Series]Dynamic Acceptance Channel
🔷 Overview
Dynamic Acceptance Channel is an adaptive volatility channel that builds a dynamic upper and lower edge around a robust median midpoint. The channel width breathes with the market's own return distribution and volatility regime, so it naturally widens when the market expands and tightens when it compresses. Every bar is classified as Inside, Breaching, or Respecting the channel, while the width itself is independently tracked as Compressed, Normal, or Expanded. The tool is designed to give traders a clean, consistent framework for reading acceptance, mean-reversion context, volatility squeezes, and adaptive range behavior across crypto, FX, and equities.
🟢 Unique Edge
Most channel indicators on the market rely on a single dispersion model — typically a moving average plus a fixed standard deviation or ATR multiplier. Dynamic Acceptance Channel takes a different route:
▪ Robust median midpoint instead of a simple mean, which stays stable when the market wicks or spikes and is not dragged around by outliers.
▪ Hybrid width model that combines the percentile spread of recent returns with a clamped ATR regime ratio. The user can switch between Hybrid, Return Percentile, or Volatility Regime, depending on whether distribution shape or raw volatility is the priority.
▪ Independent width regime classification (Compressed / Normal / Expanded) ranked against the channel's own history, with hysteresis applied so the regime does not flip-flop around threshold boundaries.
▪ Bar-level state machine (Inside, Breach, Respect) separated from the width regime, so traders can read location and regime as two orthogonal dimensions.
▪ Double-EMA smoothing on both the midpoint and the half-width, producing a calm, professional channel that is readable on any timeframe without looking jagged.
This combination is not found in common Bollinger Bands, Keltner Channels, or generic ATR channels.
🧭 Methodology
The midpoint is computed as a rolling median using linear-interpolation percentile logic, which is statistically more robust than an arithmetic mean when the return distribution is skewed or heavy-tailed. The half-width is then derived from two independent signals. The first is a return-percentile dispersion term: the script measures the 85th and 15th percentiles of recent per-bar returns, symmetrizes them, and scales by the square root of the lookback window to produce a percentile-based half-width proxy. The second is a volatility regime term: the current 14-bar ATR is compared to its own baseline over the adaptive window, and the resulting ratio is clamped between 0.6 and 1.8 to prevent explosive widths during regime shocks. The final half-width is either one of the two terms or their average, depending on the selected model, then scaled by a user-defined global multiplier and smoothed with double EMA. The width regime classification uses linear-interpolation percentiles of the channel width itself over a separate regime lookback, and a 10% hysteresis buffer prevents rapid state flipping around the Compressed and Expanded thresholds.
🎯 Signals & Alerts
▪ Channel Breached — fires on a fresh upper or lower breach, edge-triggered with a minimum three-bar gap to avoid clusters on choppy bars.
▪ Channel Compressed — fires when the width regime transitions into the Compressed state.
▪ Channel Expanded — fires when the width regime transitions into the Expanded state.
▪ Channel Respected — optional, fires when price wicked outside on the prior bar and closed back inside on the current bar, confirming a rejection at the edge.
Visuals include color-coded upper and lower lines, a regime-tinted fill, small circular breach markers on the breached line (no text labels to avoid clutter), and spaced Compressed or Expanded transition labels anchored outside the channel.
⚙️ Key Inputs
Adaptive Engine
▪ Adaptive Length — lookback window for the channel (default 60).
▪ Channel Width Model — Hybrid, Return Percentile, or Volatility Regime.
▪ Width Scale — global multiplier for tightening or loosening the channel.
▪ Channel Smoothing — EMA length for line smoothness.
▪ Strict Breach Logic — close-based versus wick-based breach.
Width Regime
▪ Compression Threshold — percentile below which the width is Compressed (default 25).
▪ Expansion Threshold — percentile above which the width is Expanded (default 75).
▪ Regime Lookback — lookback for the width percentile ranking (default 150).
Visuals
▪ Show Channel Fill, Show Midline, Show Breach Markers, Show Regime Transition Labels, Regime Label Spacing.
Panel
▪ Show / hide panel, Panel Location (6 options), Panel Font Size, Label Font Size.
Alerts
▪ Channel Breached, Compressed, Expanded, and Respected can be toggled independently.
🧠 How to Use
A common reading is to combine channel state with width regime. When the channel is Compressed and price is riding the edges, the market is often preparing for an expansion phase. When the channel transitions into Expanded, continuation on the active edge is more likely than immediate mean reversion. Respect events at either edge during Normal or Compressed regimes often line up with fade opportunities, while breaches during Expanded regimes often line up with trend continuation context. The midline can be used as a dynamic fair-value reference for pullback entries inside the channel. Traders typically overlay this script with their own structure, momentum, or higher-timeframe bias tools rather than using channel events in isolation.
⚠️ Limitations & Transparency
▪ The indicator is a context and structure tool. It does not generate buy or sell decisions and does not claim to identify every meaningful reversal or breakout.
▪ The channel is recomputed each bar from recent data, which means the current bar's channel values can refine until bar close.
▪ Width regime classification is relative to the regime lookback, not absolute. On instruments or timeframes with very low variance, the regime may behave differently than on highly volatile markets.
▪ The ATR ratio is intentionally clamped between 0.6 and 1.8. This prevents explosive widths but also means the channel will not fully mirror extreme volatility shocks; this is a deliberate design choice for readability.
▪ Alerts are configured to fire once per bar close to reduce noise. Intrabar conditions may change until close.
🛡 Risk Disclosure
This script is provided for educational and analytical purposes only. It is not a strategy, not financial advice, and not a trade recommendation. Past channel behavior on any instrument or timeframe does not imply future performance. Users are fully responsible for their own risk management, position sizing, and trading decisions. Indicator

Mean Reversion Corridors [AGPro Series]Mean Reversion Corridors
🔹 Overview
Mean Reversion Corridors is a volatility-adaptive deviation framework that maps how far price has stretched from a chosen fair-value center and classifies that stretch into two actionable zones. An inner corridor marks the early reversion band where price is meaningfully extended but not yet extreme; an outer corridor marks statistical exhaustion where continuation becomes less probable under normal conditions. A higher-timeframe trend filter separates controlled mean reversion from failure-continuation expansions, so traders can tell fading the edge from respecting a real break — all from a single clean overlay.
🔸 Unique Edge
Most band systems (Bollinger, Keltner, ATR channels) offer a single width engine and a single band pair, leaving the trader to guess whether a tag is an exhaustion or a breakout. Mean Reversion Corridors is built around three ideas that work together:
- A dual-engine width unit that linearly blends ATR (range-based) and Standard Deviation (dispersion-based) so the corridor is stable on both gap-heavy and low-dispersion regimes.
- A two-layer corridor with distinct roles — inner for early stretch, outer for exhaustion — rendered as transparent zones you can read at a glance.
- A regime-aware state machine that uses a higher-timeframe trend filter to reclassify outer tags as either reversion candidates or failure-continuation, tracked as explicit REV and FAIL states with a bounded confirmation window.
🧠 Methodology
- Center Model — user choice of EMA, VWMA (volume-aware, default) or HMA (responsive), calculated on chart closes.
- Width Unit — the current volatility unit is a linear blend: (1 − blend) × ATR + blend × StDev, protected against empty volatility periods.
- Corridors — inner band at ±(width × inner multiplier), outer band at ±(width × outer multiplier). Stretch is reported in width-unit sigma.
- Trend Filter — the same center model is evaluated on a higher-timeframe via request.security with lookahead off, and its slope is normalized by ATR so the "strong" threshold is volatility-aware, not symbol-specific.
- State Machine — tracks the most recent outer-band extreme with a rolling 20-bar confirmation window. A reversion is confirmed only when price closes back inside the inner corridor and the trend filter is not strongly aligned with the original stretch. When the trend is strongly aligned, the outer break is reclassified as corridor failure (continuation).
- All conditions evaluate on confirmed bars to avoid repainting behavior.
⚡ Signals & Alerts
On-chart markers:
- REV — reversion confirmed back through the inner band after an outer extreme, trend-filtered.
- FAIL — corridor failure / trend-aligned continuation beyond the outer band.
Six bar-close alert conditions:
- Inner corridor entered — upside stretch
- Inner corridor entered — downside stretch
- Outer corridor hit — upside exhaustion
- Outer corridor hit — downside exhaustion
- Reversion confirmed
- Corridor failure (continuation)
⚙️ Key Inputs
- Center Model — EMA / VWMA / Hull
- Center Length and Volatility Length — independent lookbacks
- ATR ↔ StDev Blend — balance between range and dispersion engines
- Inner Corridor Width and Outer Corridor Width — in volatility units
- Trend Filter — enable, timeframe, length, strength threshold
- Visuals — outer-only mode, center line, fills, edge tags, state labels, label size
- Info Panel — show/hide, position (six options), font size
- Alerts — individually toggleable for each of the six events
📖 How to Use
- Start with the defaults on your main chart timeframe. The 34-period VWMA center, balanced blend and 1.0 / 2.2 inner/outer multipliers are chosen to work as a neutral starting point across liquid markets.
- Inner corridor tags are early stretch cues — they flag that price is extended, not that a turn is due. Use them as context for setups, not as standalone signals.
- Outer corridor tags with the trend filter neutral or opposed are the primary mean reversion setup; wait for a REV confirmation back inside the inner band before acting.
- When FAIL appears, the stretch is trend-aligned; treat the outer band as continuation, not resistance. This is the signal to stop fading.
- Use the Info Panel to read current state, reversion bias, trend regime and stretch magnitude in sigma at a glance.
⚠️ Limitations & Transparency
- This is an analytical tool, not a trading strategy or financial advice. It does not predict future price.
- Band-based classification assumes statistical behavior; during shocks, news events or illiquid sessions the width engine can lag.
- The trend filter uses a higher-timeframe slope — it reacts slower than short-term momentum by design, which is the intended behavior.
- Signals are evaluated on confirmed bars; intrabar crosses are not counted as events.
- Past behavior of any indicator does not guarantee future results. Always apply your own risk management. Indicator

Turtle Soup Reversal Map [AGPro Series]Turtle Soup Reversal Map
🔹 Overview
Turtle Soup Reversal Map is a mean-reversion pattern detector inspired by Linda Raschke's classic "Turtle Soup" setup — a counter-attack on failed 20-bar breakouts. When price pierces a multi-bar extreme and then closes back inside the prior range, institutional traders often interpret it as trapped breakout participants being flushed. This script automates the detection, qualifies each setup with a transparent 0–100 score, and projects a reference target alongside an auto-resolving rejection zone. It is designed for traders who want a disciplined, rule-based way to spot failed breakouts without drawing them manually.
🔹 Unique Edge
Unlike generic liquidity-sweep or wick-rejection indicators, Turtle Soup Reversal Map is built around Raschke's specific 20-bar-extreme rule — a pattern with decades of documented performance in swing-trading literature. Three characteristics separate it from similar tools:
• Strict N-bar-extreme definition (not a simple swing-high/low fade). Price must violate the exact prior-lookback extreme, not just a minor pivot.
• Five-component adaptive quality score — wick rejection, volume spike, overshoot magnitude, higher-timeframe trend alignment, and key-level proximity. Each component is a transparent weighted contribution, with clear A+ / A / B / C grades.
• Full lifecycle state engine — Pending → Fired → Target/Stop/Invalidated. Setups that do not confirm within their window are auto-invalidated (not left hanging), and live win-rate plus average R-multiple are tracked over the most recent resolved setups.
🔹 Methodology
The script continuously monitors for price piercing the highest high or lowest low of the prior N bars (default 20, range 10–50). When a sweep occurs, a Pending setup is created. Confirmation is then evaluated in one of two user-selectable modes:
• Same-Bar Close — the violating bar must close back inside the prior range on the same bar (faster, more signals).
• Next-Bar Close — Raschke's original specification; the next bar must close back inside the prior range (slower, higher reliability).
If confirmation fires, the setup becomes Fired and a reference target is projected from the confirmation close (default 2.5 × ATR(14)). Stop is placed at the sweep extreme plus a configurable ATR buffer. Setups that fail to confirm within their window, or where price overshoots the stop before confirmation, are automatically invalidated.
The quality score blends: wick-to-range ratio at the extreme bar, relative volume spike versus its 20-bar average, overshoot magnitude (ATR-normalized with a sweet-spot curve), counter-trend alignment against a user-defined higher timeframe, and proximity to round numbers or recent pivot levels.
🔹 Signals & Alerts
The script produces three alert types, all configurable:
• Pending — sweep detected, awaiting confirmation.
• Fired — confirmation closed back inside prior range.
• Invalidated — setup dismissed due to overshoot or window timeout.
Each alert message includes direction (Bull/Bear), current grade, ticker, and timeframe. Fired setups are visualized with a labeled confirmation marker, a dashed target-projection line, a dotted stop-reference line, and an auto-closing rejection zone. Labels display the Soup-Bull / Soup-Bear name, grade, and numeric score.
🔹 Key Inputs
• Lookback Bars — size of the extreme window (default 20, range 10–50).
• Confirmation Mode — Same-Bar Close or Next-Bar Close.
• Invalidation Distance (ATR) — stop buffer beyond the sweep extreme (default 0.5).
• Target Projection (ATR) — reference reversal target distance from entry (default 2.5).
• Quality Score Components — each of the five score components can be toggled independently for custom configurations.
• HTF for Trend — higher timeframe used for the trend-alignment component (default 240 min).
• Stats Sample Size — rolling window of resolved setups used for win-rate and average reward metrics (default 30).
• Visual & Panel Options — zones, lines, labels, target projection, panel location, font sizes, and per-element toggles.
🔹 How to Use
1. Apply to any liquid instrument and timeframe. The pattern's rule set is symbol-agnostic but performs differently across assets — review the live Win Rate and Avg Reward metrics in the panel to calibrate expectations.
2. Watch the Status field in the panel. Idle means no active setup; Pending Bull/Bear means a sweep has occurred and the script is waiting for confirmation; Fired Bull/Bear means confirmation closed and a target has been projected.
3. Filter setups by grade. A+ and A setups have stronger confluence — particularly wick rejection, volume, and HTF alignment. B setups are acceptable under favorable market regimes; C grades are educational only.
4. Treat the target projection as a reference, not a trade instruction. The stop reference line marks where the structural invalidation lies. Always combine with your own risk management.
5. The historical Win Rate is computed over the last N resolved setups on the current chart; it reflects the pattern's fit with the current symbol and timeframe, not a guarantee.
🔹 Limitations & Transparency
This indicator identifies historical setups algorithmically. It does not predict future price movement, and no indicator does. Turtle Soup is a counter-trend mean-reversion pattern — in strong trending regimes, false signals increase; in consolidation and range-bound conditions, it performs best. The displayed Win Rate and Avg Reward are historical, rolling, chart-dependent, and should not be interpreted as future expectations. Target and stop references are geometric projections based on ATR, not optimized parameters.
🔹 Risk Disclosure
This script is a technical analysis tool for educational and research purposes. It is not a trading strategy, not a recommendation, and not financial advice. Past performance does not guarantee future results. Always conduct your own analysis and use proper risk management. Trade at your own risk. Indicator

Liquidity Void Navigator [AGPro Series]Liquidity Void Navigator
🔹 OVERVIEW
Liquidity Void Navigator identifies impulsive price displacements that were produced with disproportionately low volume participation — the institutional footprint of a true liquidity void. Unlike geometric gap concepts that rely purely on wick-to-wick imbalance, this engine measures the efficiency of each impulsive bar: how much price moved relative to how much volume was transacted. When price travels faster than the order book justifies, a magnet zone is born. These zones frequently act as high-probability retest and mean-reversion targets for SMC and ICT traders.
🔹 UNIQUE EDGE
Most gap-based tools on PulseWire detect Fair Value Gaps using a 3-bar geometric pattern. This indicator uses a fundamentally different signature:
- Volume Efficiency Ratio (core innovation): efficiency = (volume / avgVol) / (range / ATR). Values below the threshold reveal bars where price displacement outpaced volume effort — the statistical definition of a liquidity void.
- Body-based zones, not wick-to-wick: the void box spans the impulsive candle body, excluding wicks that represent liquidity sweeps.
- Dynamic lifecycle management: zones are tracked from birth through mid-line mitigation, with configurable trigger modes (close cross, wick touch, or full fill).
- Strongest-void emphasis: the lowest-efficiency active void automatically receives a bold neutral-colored border, giving traders an at-a-glance view of the most reliable magnet on the chart.
🔹 METHODOLOGY
Each completed bar is evaluated against four quality filters:
1. Range Expansion — bar range must exceed ATR × configurable multiplier (default 1.3).
2. Volume Efficiency — the efficiency ratio must fall below the configurable cap (default 0.85).
3. Minimum Height — void must be at least a fraction of ATR to filter micro-noise (default 0.5×).
4. Body Dominance — the candle body must represent at least 50% of the total range, confirming directional conviction rather than indecision.
Qualifying bars create a directional void zone spanning the body. An optional next-bar gap confirmation adds stricter FVG-style filtering. Active zones are continuously evaluated against the selected mitigation mode and updated in real time. Oldest active voids are pruned when the per-side cap is exceeded, keeping the chart focused on recent, actionable structure.
🔹 SIGNALS & ALERTS
Four alert conditions are available:
- New Bullish Liquidity Void — an upward impulsive void is detected.
- New Bearish Liquidity Void — a downward impulsive void is detected.
- Bull Void Mitigated — closing price crosses the mid-line of an active bullish void from above.
- Bear Void Mitigated — closing price crosses the mid-line of an active bearish void from below.
Each alert fires only on bar close to eliminate repainting concerns. Alert messages include the ticker and timeframe for multi-chart workflows.
🔹 KEY INPUTS
Void Detection
- Volume Baseline Lookback — window for average volume and range calculations.
- Min Range Expansion (×ATR) — minimum impulsive bar size.
- Max Volume Efficiency Ratio — core void qualification threshold.
- Min Void Height (×ATR) — filters micro-voids.
- Require Gap with Next Bar — optional strict confirmation.
- Mitigation Trigger — choose between Close Cross (institutional default), Wick Touch (strict), or Full Fill (swing).
Lifecycle
- Max Active Voids per Side — visual cap to prevent chart clutter.
- Zone Right Extension — how far zones project to the right.
- Show Mitigated Voids — optionally display filled zones in gray.
Visuals
- Bullish / Bearish / Mitigated colors, mid-line toggle, projection arrow toggle, label size.
Panel
- Show / position / font size.
🔹 HOW TO USE
Trend-aligned reversion entries: When price returns to an unmitigated void in the direction of the higher-timeframe trend, watch for rejection at the mid-line or far edge as a potential long (bull void) or short (bear void) trigger.
Breakout continuation context: Newly formed voids in the direction of a breakout often indicate institutional participation. Waiting for a retest of the void zone can provide improved risk-to-reward compared to chasing the breakout bar.
Strongest-void bias: The yellow-bordered void on the chart represents the lowest-efficiency (statistically strongest) active zone. Traders can treat it as the highest-probability magnet for price revisits.
Fill Rate context: A persistently high fill rate on a given symbol or timeframe indicates that voids fill rapidly — more suitable for scalping. A lower fill rate suggests that unfilled voids accumulate meaningfully, offering swing-style opportunities.
Multi-timeframe workflow: Identify voids on a higher timeframe (4H or 1D) as strategic bias zones, then use a lower timeframe (15m or 1H) for tactical execution when price approaches those higher-timeframe voids.
🔹 LIMITATIONS & TRANSPARENCY
- This indicator is built for liquid markets with reliable volume data. Thinly traded symbols or instruments without accurate volume feeds (some spot FX, certain indices) will produce unreliable results.
- Not every detected void will be retested or filled. Voids are statistical zones of interest, not guarantees.
- The indicator is a visualization and analytical tool, not a trading strategy. It does not generate buy or sell recommendations.
- Fill rate statistics are computed over the visible history of active and mitigated voids and are approximate; they are intended as a relative gauge of symbol behavior, not as a backtested performance metric.
- Mitigation triggers are bar-close based to avoid repainting. Intrabar signals may appear and disappear until the bar confirms.
- Zones have a fixed right extension from their birth bar; the indicator does not extend zones infinitely.
🔹 RISK DISCLOSURE
Trading financial markets involves substantial risk of loss and is not suitable for all investors. Past performance of any technical indicator, including this one, is not indicative of future results. This tool is provided for educational and analytical purposes only and does not constitute financial advice, investment recommendations, or solicitation to trade. Users are solely responsible for their own trading decisions, risk management, and outcomes. Always conduct independent analysis and consult with a qualified financial advisor before making investment decisions. Indicator

Rolling Midpoint Engine [AGPro Series]Rolling Midpoint Engine
### Overview
Rolling Midpoint Engine is an on-chart study that converts the geometric midpoint of the last N bars' high-low range into a living control line. The midline is tracked through three behavioral states — Accepted Above, Accepted Below, and Fight — and a fourth modifier (Strong) highlights high-conviction acceptance beyond an ATR threshold. The goal is to surface how price behaves around a single dominant reference level, not to predict direction or issue trade signals.
### Unique Edge
Most midpoint tools plot a static line and let the user eyeball whether price accepts or rejects it. Rolling Midpoint Engine formalises that observation into a finite state machine that requires consecutive body-closes on one side of the midline before declaring acceptance. This filters single-bar noise and distinguishes casual tags from genuine commitment. The ATR-based Strong modifier adds a second axis of information — how firmly the current side is being held — without multiplying states or cluttering the chart with additional lines.
### Methodology
The midline is computed as the average of the highest high and the lowest low over a user-defined rolling window. Optional light EMA smoothing reduces visual jitter without materially shifting the level; a Strict Reset mode disables smoothing for pure rolling output.
Acceptance is evaluated through two streak counters tracking consecutive closes (or full bars, if the user prefers a stricter rule) on each side of the midline. When a streak reaches the Acceptance Bars threshold, the state transitions to Accepted Above or Accepted Below. If the running streak is positive but below threshold, the state is Fight. A Strong flag activates whenever the current distance from the midline exceeds a configurable ATR multiple.
All logic uses confirmed bar closes. The script does not repaint historical states once a bar has closed.
### States & Alerts
States:
- Fight — price is oscillating around the midline without sustained commitment
- Accepted Above — body-closes above the midline for the required number of bars
- Accepted Below — body-closes below the midline for the required number of bars
- Strong (modifier) — current Accepted state is held beyond the ATR threshold
Alerts:
- Midline Crossed Up / Down — raw price cross of the midline
- Accepted Above / Below — state transitions into acceptance
- Midline Rejection — state flip between Accepted Above and Accepted Below, or collapse from an Accepted state back to Fight
### Key Inputs
- Rolling Length — number of bars defining the range window
- Strict Reset Mode — toggle between pure rolling midline and lightly smoothed output
- Acceptance Bars — consecutive body-closes required for acceptance
- Use Body Close vs. Full Bar — strictness of the side-determination rule
- Strong Threshold — ATR multiple that qualifies an accepted side as Strong
- Label Style / Size — Edge Only, Edge + Transitions, or Off
- Panel Location / Theme / Font Size — four corners plus Middle Right, Dark / Light / Auto themes
- Color Midline by State — toggle state-coloring on the dominant line
### How to Use
Apply the indicator to any symbol and timeframe. The midline acts as a rolling control level; the state label on the right edge summarises the current behavior. Treat Accepted Above / Below as evidence that the midline is holding as support or resistance on the corresponding side. A transition into Strong indicates the holding is well beyond routine noise. A rejection event — the state flipping or collapsing back to Fight — suggests the prior control has been compromised.
This is a contextual reading tool. It does not produce entries, exits, targets, or stops, and should not be read as a recommendation to transact.
### Limitations & Transparency
The midline reflects past price data only and will adapt as new highs or lows enter the rolling window. On illiquid or very low-timeframe charts, the streak-based acceptance logic can feel slow; increasing Acceptance Bars on noisier instruments or lowering it on cleaner ones is expected tuning. The Strong Threshold is volatility-relative via ATR but still an arbitrary cut — defaults are calibrated for typical liquid markets and may need adjustment for thinly traded symbols.
The script uses confirmed closes and does not alter historical state once a bar has closed. Intrabar, the displayed state can update in line with current price, as with any live indicator.
### Risk Disclosure
This indicator is an analytical study. It is not a strategy, not a signal service, and not financial advice. It does not forecast future prices and does not guarantee any outcome. Past behavior of price around the midline does not imply future behavior. Every trading decision is the sole responsibility of the user. Use appropriate risk management and test the tool in a non-committed environment before incorporating it into any workflow. Indicator

Iterative Locally Periodic EnvelopeThe Iterative Locally Periodic Envelope is a phase-conditioned kernel estimator with temporal locality and endogenous dispersion modeling, implemented as a Nadaraya–Watson estimator under a locally periodic kernel.
The locally periodic kernel defines similarity through cyclical phase alignment modulated by temporal proximity. Observations contribute to the estimator based on both their position within a repeating cycle structure and their recency, emphasizing structural recurrence with sensitivity to local regime conditions.
The indicator computes a latent equilibrium using a kernel-weighted mean and a dispersion measure using kernel-weighted variance under the same weighting structure. The resulting envelope reflects cycle-consistent deviation with temporal locality, rather than a conventional volatility band. All values are computed exclusively on closed historical bars using a bounded lookback window to ensure non-repainting behavior.
This indicator belongs to a broader class of iterative kernel-based envelopes that includes Gaussian, Rational Quadratic, and Periodic variants. All share a common Nadaraya–Watson estimation framework, differentiated by their kernel.
TRADING USES
The Iterative Locally Periodic Envelope is best interpreted as a cycle-aware structural estimator with adaptive temporal sensitivity, rather than a volatility-based band. The temporal locality component allows the estimator to adapt more readily to emerging regime shifts than the pure periodic variant.
Equilibrium Tracking
The latent equilibrium represents the phase-conditioned central tendency of price under locally periodic similarity weighting. Oscillations around this level reflect movement within a repeating structural cycle, with more recent phase-aligned observations contributing more strongly than temporally distant ones.
Cycle Regime Structure
The envelope emphasizes repeating structural behavior through phase recurrence weighting, modulated by temporal decay. Changes in symmetry, amplitude, or persistence of oscillation around the latent equilibrium may indicate transitions between cyclical regimes.
Mean Reversion Within Cycles
When a stable periodic structure is present, deviations from the latent equilibrium may revert toward phase-consistent levels. Mean-reversion behavior is conditioned on both cycle structure and temporal proximity.
Structural Extremes
Extreme deviations relative to the envelope correspond to phase-inconsistent states where cyclical structure becomes stretched or destabilized. Because the kernel incorporates temporal decay, these conditions are identified with greater sensitivity to recent price behavior.
State Estimation
The system defines a latent equilibrium as the inferred central cyclical state under joint phase and temporal weighting, with dispersion derived from kernel-weighted variance under identical constraints. This produces a structurally consistent representation of the market state that is sensitive to both cyclical position and local regime conditions.
LOCALLY PERIODIC ENVELOPE CONSTRUCTION
The envelope is constructed using kernel-weighted variance under the same locally periodic similarity measure used to estimate the latent equilibrium. The latent equilibrium defines the central state estimate and kernel-weighted variance defines dispersion under identical weighting, producing an endogenously determined envelope. The band width is fixed at ±1 kernel standard deviation with no multiplier, ensuring dispersion remains an intrinsic property of the locally periodic similarity structure rather than an externally imposed scaling parameter.
THEORY
The locally periodic kernel defines similarity in terms of cyclical phase recurrence modulated by temporal proximity. Observations contribute to the estimator based on alignment within a repeating cycle structure, with influence attenuated by temporal distance from the estimation point.
The estimator is formulated as a Nadaraya–Watson kernel regression under a locally periodic kernel, where weights are defined as:
k(i) = exp( -2 · sin²(πi / p) / L² ) · exp( -i² / 2L² )
Where:
p = period (cycle length)
L = lookback window (shared bandwidth parameter; effective smoothing scales with L²)
In this MacKay consistent formulation, the lookback window acts as a unified bandwidth parameter governing periodic phase selectivity and the Radial Basis Function (RBF) temporal decay envelope. The two components are coupled through L, producing a kernel that simultaneously emphasizes phase-aligned and temporally proximate observations.
As L increases, both the periodic and RBF components broaden, producing stronger smoothing across phase and time. As L decreases, phase selectivity and temporal locality both increase, making the estimator more sensitive to recent cycle-consistent observations.
This induces a similarity structure in which influence concentrates at phase-aligned intervals within a temporally bounded neighborhood. The resulting estimator defines a latent equilibrium governed by phase alignment and temporal proximity that can be interpreted as a locally stationary periodic extension of kernel regression on a circular phase manifold.
The key distinction from the pure periodic kernel is that phase-aligned observations at distant lags are progressively suppressed by the RBF decay term, allowing the estimator to adapt to structural drift while preserving cycle-aware weighting. During stable cyclical regimes the two estimators converge; during structural transitions the locally periodic variant adapts faster by downweighting older phase information.
CALIBRATION
As established in Gaussian Processes for Machine Learning (Rasmussen & Williams, 2006), the period should reflect the recurrence interval of the dominant cycle in the data, while the bandwidth parameter L controls how quickly similarity decays away from perfect phase alignment. For daily charts, common cycle anchors include the trading week (~5 bars), trading month (~21 bars), trading quarter (~63 bars), and trading year (~252 bars).
Length (Lookback / Bandwidth)
Controls structural depth of the estimator and acts as the unified bandwidth parameter for the periodic and RBF components; as L governs phase selectivity and temporal decay simultaneously, its effect is stronger than in the pure periodic variant. The default of 100 reflects the locally periodic kernel's temporal decay component; at longer lengths the RBF term weakens and behavior converges toward the pure periodic estimator.
- 50–100: high responsiveness, strong temporal locality, short-cycle sensitivity
- 150–250: balanced regime stability with moderate temporal decay
- 300+: broad structural smoothing, weak temporal decay, behavior converges toward pure periodic envelopes
Period (Cycle Length)
Defines the recurrence interval of the kernel and governs phase alignment and cyclical structure. Shorter periods increase phase resolution and cycle sensitivity, while longer periods emphasize broader structural recurrence. The period should reflect the dominant cycle present in the data, aligned with the anchor scales defined above.
Start At Bar
Offsets the kernel window backward from the most recent bars and excludes newer observations from the estimator. This ensures all calculations are based strictly on closed historical data and preserves non-repainting behavior.
MARKET USAGE
Stock, Forex, Crypto, Commodities, and Indices.
Performance is dependent on the presence of stable cyclical structure; in regimes lacking periodic coherence, the estimator converges toward a local smoother with reduced phase discrimination. Indicator

Iterative Periodic EnvelopeThe Iterative Periodic Envelope is a phase-conditioned kernel estimator with endogenous dispersion modeling, implemented as a Nadaraya–Watson estimator under a canonical periodic kernel.
The periodic kernel defines similarity through cyclical phase alignment rather than temporal proximity or multi-scale distance decay. Observations contribute to the estimator based on their position within a repeating cycle structure, emphasizing structural recurrence over linear time dependence.
The indicator computes a latent equilibrium using a kernel-weighted mean and a dispersion measure using kernel-weighted variance under the same weighting structure. The resulting envelope reflects cycle-consistent deviation, rather than a conventional volatility band. All values are computed exclusively on closed historical bars using a bounded lookback window, ensuring non-repainting behavior.
This indicator belongs to a broader class of iterative kernel-based envelopes that includes Gaussian and Rational Quadratic variants. All share a common Nadaraya–Watson estimation framework, differentiated by their kernel.
TRADING USES
The Iterative Periodic Envelope is best interpreted as a cycle-aware structural estimator rather than a volatility-based band.
Equilibrium Tracking
The latent equilibrium represents the phase-conditioned central tendency of price under periodic similarity weighting. Oscillations around this level reflect movement within a repeating structural cycle rather than directional drift.
Cycle Regime Structure
The envelope emphasizes repeating structural behavior through phase recurrence weighting. Changes in symmetry, amplitude, or persistence of oscillation around the latent equilibrium may indicate transitions between cyclical regimes.
Mean Reversion Within Cycles
When a stable periodic structure is present, deviations from the latent equilibrium may revert toward phase-consistent levels. This supports mean-reversion behavior that is conditioned on cycle structure rather than purely statistical dispersion.
Structural Extremes
Extreme deviations relative to the envelope correspond to phase-inconsistent states where cyclical structure becomes stretched or destabilized. These conditions often precede transitions such as cycle inversion, expansion, or compression.
State Estimation
The system defines a latent equilibrium as the inferred central cyclical state, with dispersion derived from kernel-weighted variance under identical periodic similarity constraints. This produces a structurally consistent representation of market state.
PERIODIC ENVELOPE CONSTRUCTION
The envelope is constructed using kernel-weighted variance under the same periodic similarity measure used to estimate the latent equilibrium. The latent equilibrium defines the central state estimate and kernel-weighted variance defines dispersion under identical weighting, producing an endogenously determined envelope. The band width is fixed at ±1 kernel standard deviation with no multiplier, ensuring dispersion remains an intrinsic property of the periodic similarity structure rather than an externally imposed scaling parameter.
THEORY
The periodic kernel defines similarity in terms of cyclical phase recurrence rather than linear temporal distance. Observations contribute to the estimator based on alignment within a repeating cycle structure.
The estimator is formulated as a Nadaraya–Watson kernel regression under a canonical periodic kernel, where weights are defined as:
k(i) = exp( -2 · sin²(πi / p) / L² )
Where:
p = period (cycle length)
L = lookback window (bandwidth parameter; effective smoothing scales with L²)
In this MacKay consistent formulation, the lookback window acts as a bandwidth control parameter, governing phase selectivity and structural smoothing. As L increases, the kernel becomes broader, producing stronger smoothing and reduced phase sensitivity. As L decreases, phase selectivity increases and the estimator becomes more locally sensitive to cyclical alignment.
This induces a cyclical similarity structure in which influence concentrates at recurring phase intervals. The resulting estimator defines a latent equilibrium governed by phase alignment rather than temporal proximity. This formulation can be interpreted as a periodic extension of kernel regression on a circular phase manifold.
CALIBRATION
Length (Lookback / Bandwidth)
Controls structural depth of the estimator and acts as the primary kernel bandwidth parameter.
- 50–100: high responsiveness, short-cycle sensitivity
- 150–250: balanced regime stability
- 300+: strong structural smoothing, reduced sensitivity to phase noise
Period (Cycle Length)
Defines the recurrence interval of the kernel and governs phase alignment and cyclical structure. Commonly aligns with dominant market rhythms such as intraday or macro-cycle structure.
- Lower values: faster cycle sensitivity
- Higher values: slower, broader structural cycles
Start At Bar
Offsets the kernel window backward from the most recent bars and excludes newer observations from the estimator. This ensures all calculations are based strictly on closed historical data and preserves non-repainting behavior.
MARKET USAGE
Stock, Forex, Crypto, Commodities, and Indices.
Performance is dependent on the presence of stable cyclical structure; in regimes lacking periodic coherence, the estimator converges toward a smoother, low-information state. Indicator

AG Pro Williams %R Exhaustion Map [AGPro Series]AG Pro Williams %R Exhaustion Map
Overview / What it does
AG Pro Williams %R Exhaustion Map is a bounded-oscillator reaction map built to study exhaustion behavior around the extreme ends of Williams %R. Instead of treating Williams %R as a simple overbought/oversold trigger, this script maps whether an extreme reading is only being touched briefly, held with persistence, beginning to release, failing to release, or unwinding with more structure. The goal is to organize extreme-zone behavior into readable states rather than reduce the tool to a basic reversal shortcut.
The script is designed for traders who want to understand when an extreme condition is still being sustained and when that same condition may be starting to lose efficiency. In practice, that means the script focuses less on isolated crossings and more on the sequence around them: entry into an extreme zone, time spent there, the first release attempt, the possibility of a failed release, and the confirmation of an exhaustion unwind. This sequence-based framing is what gives the tool its map identity.
Within the AG Pro series, this script is intentionally separate from tools that revolve around trend confirmation, centerline balance, divergence, or generic momentum shifts. It is also intentionally separate from the series' Stochastic-based exhaustion work. Stochastic can be useful for reading swing rhythm and rotational turns, while this Williams %R version is centered more tightly on bounded extreme persistence and release behavior. In other words, this script is not presented as an alternative skin for another oscillator. It is a different framework for reading how price behaves when an oscillator remains pinned near an edge and then attempts to escape that condition.
Unique Edge
The unique edge of this script is not that it plots Williams %R, but that it classifies the life cycle of an extreme reading. The script distinguishes between stretch, locked conditions, release attempts, failed releases, and exhaustion unwinds. That structure helps separate three situations that are often mixed together in standard oscillator use:
1) an extreme reading that is still being sustained,
2) an extreme reading that has started to weaken but may still fail, and
3) an extreme reading that is releasing with enough follow-through to qualify as an exhaustion unwind.
This matters because many standard oscillator workflows treat every exit from an extreme zone as if it carried the same informational value. This script does not. It places more emphasis on persistence, release quality, and post-release follow-through, which can help users avoid treating every early reversal attempt as equivalent.
Methodology
The script begins with Williams %R and user-defined extreme thresholds. From there, it evaluates how long the oscillator remains in the upper or lower extreme zone and how deeply it is embedded in that zone. This forms the basis of the lock-strength logic. A fast touch into an extreme area and an extended embedded condition are therefore not interpreted in the same way.
Once an extreme condition has persisted long enough, the script begins monitoring for a release. A release is not defined as any random movement away from the boundary. It requires the prior extreme condition to have had sufficient persistence and then looks for a buffered move away from the threshold. This helps reduce noise from trivial fluctuations around the extreme lines.
After a release is detected, the script continues to track what happens next. If the oscillator quickly slips back into the same extreme region, the move can be classified as a failed release. If the move continues far enough away from the release anchor within the confirmation window, it can be classified as an exhaustion unwind. This post-release tracking is a central part of the script's design because it helps distinguish between temporary relief and more meaningful exhaustion release.
The panel summarizes this process using state, side, lock strength, and release quality. Lock strength is intended to reflect how established the prior extreme condition was. Release quality is intended to reflect the quality of the release sequence, not forecast what price must do next. These metrics are descriptive and contextual. They are not guarantees.
Signals & Alerts
This script provides event-style labels and alert conditions for the main transitions in the exhaustion sequence. The alerts are deterministic and tied to explicit script conditions rather than discretionary interpretation.
Main event types:
- Bullish release detected
- Bearish release detected
- Bullish release failed
- Bearish release failed
- Bull exhaustion unwind confirmed
- Bear exhaustion unwind confirmed
How to interpret them:
- A release event marks the first qualified move away from a persistent extreme condition.
- A failed release marks a release attempt that reverted back into the prior extreme condition too quickly.
- An exhaustion unwind confirmation marks a release that traveled far enough from its anchor within the configured window to qualify as a more established unwind sequence.
These events are intended to help structure chart reading. They are not standalone trade instructions, and they are not framed as guaranteed reversal signals.
Key Inputs
Williams %R Length
Controls the oscillator lookback period.
Upper Extreme / Lower Extreme
Define the zones used to classify upper and lower exhaustion behavior.
Lock Bars
Controls how much persistence is required before an extreme condition is treated as locked rather than only stretched.
Release Buffer
Adds distance beyond the raw threshold so the script does not treat every minor edge fluctuation as a release.
Confirm Distance / Confirm Window
Control how far and how quickly a release must extend to qualify as an exhaustion unwind.
Fail Window
Controls how quickly a release can revert back into the extreme zone and still be classified as a failed release.
Event Memory Bars
Controls how long the release state is remembered on the chart.
Visual Settings
Allow users to control event labels, minimum spacing between labels, background tint, and optional price-bar coloring.
Panel Settings
Allow users to control panel visibility, placement, font size, and theme.
How this differs from related AG Pro scripts
This script should not be confused with the series' other momentum or exhaustion tools.
Compared with Stochastic-based exhaustion work in the AG Pro series, this script is less about oscillator rhythm and more about the persistence and release structure of a bounded extreme condition. The emphasis here is on whether Williams %R remains pinned, whether the first escape attempt fails, and whether the unwind becomes established.
Compared with RSI-, CCI-, or MFI-oriented workflows, this script is not a centerline trend model, not a divergence engine, and not a money-flow proxy. Its purpose is narrower and more specific: to map the state transition of extreme Williams %R conditions.
Compared with broader trend or regime tools in the AG Pro series, this script is not trying to classify the full market environment by itself. It is better understood as a focused reaction map that can be used alongside a user's own structure, trend, or risk framework.
Limitations & Transparency
This is an indicator, not a strategy. It does not place orders, it does not calculate performance statistics, and it does not claim to predict future price direction. It visualizes oscillator-state transitions derived from Williams %R and user-defined thresholds.
Like all bounded oscillators, Williams %R can remain in extreme territory for extended periods during strong directional conditions. For that reason, an extreme reading should not automatically be interpreted as a reversal condition. This script attempts to improve that interpretation by separating stretch, lock, release, failed release, and unwind behavior, but it does not eliminate false positives.
Results can vary meaningfully with symbol, timeframe, volatility regime, and input configuration. Traders should expect the script to behave differently on very quiet markets, strongly trending markets, and highly reactive instruments. Label frequency and state persistence can also change materially when thresholds and confirmation settings are adjusted.
This tool is intended to support chart organization and decision framing. It should be used with the user's own market structure analysis, execution model, and risk management process.
Risk Disclosure
This script is provided for educational and analytical purposes only. It is not financial advice, not a solicitation, and not a promise of results. Trading and investing involve risk, including the risk of loss. No indicator can remove uncertainty from markets, and no exhaustion signal guarantees reversal, continuation, or trade success.
Users should validate any workflow with their own testing, judgment, and risk controls before using it in live decision-making.
Indicator

Multi-Factor Regime Scoring & Alerts [HYPR-run]DESCRIPTION:
Composite regime scoring system that fuses eight independent market dimensions into a single normalized Regime Factor (-1 to +1). The sweet spot is the +/-0.2 zone: when the Regime Factor crosses through this zone (dim white circles on chart), the regime just shifted from one side to the other through neutral. That crossover, with the HMA-smoothed Regime Curve sloping in the same direction, is the highest-conviction entry the composite produces. The alerts are built around this: Regime Pivot fires at +/-0.25 with volatility band confirmation.
DISCOVERING EDGE
Pursuing a mechanical edge in entry/exit timing, confirmation and conviction sizing led us to developing an oscillating expression of most of the key criteria we use in building automated strategies. We discovered there is a sweet-spot for higher conviction trades in the +/-0.2 - .+/-0.3 zone. For example if a SFP presents, waiting for the REGIME Factor to enter the zone has a higher probability of trending than if taken earlier. In addition, for earlier reversion trades, XO/XU the outer most levels of +/-0.6 are excellent early entries when following a disciplined sizing methodology.
EIGHT SCORING DIMENSIONS
1. Macro Pivot (+/-10): ROC regime exhaustion into inflection
2. ROC Filter (+/-9): layered rate of change momentum states
3. ADXVMA (+/-9): adaptive trend direction with regime gradient
4. OBVIX (+/-5): on-balance volume, volatility, and trend composite
5. Convergence (+/-7): multi-timeframe alignment across 7 timeframes
6. Mean Reversion (+/-10): blow-off detection and spike revert signals
7. Levels (+/-8): positioning relative to 50d, 200d, 10w moving averages
8. Mechanical Hold (+/-5): price action hold signals with squeeze detection
Macro pivot and mean reversion (+/-10 each) are the heaviest. When both fire in the same direction, they swing the composite by nearly a third of its total range.
HOW TO USE
Add to chart, adjust ADXVMA and Turtle periods to match your setup. Read the Regime Factor, not the price. Above +0.6 = strong bullish; XO/XU these levels for early starter positions. Below -0.6 = strong bearish. The +/-0.2 zone is the sweet spot: crossovers here (dim white circles) mark high-probability entries or confirmation to other set-ups like an SFP. The Regime Curve shows the trend of the regime itself; when the curve slopes against the score, the regime is decelerating.
When the composite is ambiguous (between 0.2 and 0.6), the dashboard tells you why. Macro pivot green but ROC filter yellow = inflection detected, momentum hasn't confirmed. Convergence bright green but ADXVMA yellow = multi-TF aligned but local MA still flat.
CROSS-DIMENSIONAL READS
The power is reading 2-3 dashboard rows together:
- Macro pivot firing while ROC filter still green = earliest warning of trend exhaustion
- "Macro Lc confirmed" + convergence at +5 or higher = highest-conviction reversal entry
- ADXVMA "Early Bull" + convergence at +5 = trend birth signal
- Convergence at +7 = strongest trend confirmation AND trigger for mean reversion detection. Maximum agreement = maximum overextension risk
- "Blow-Off" + "Hodl S" = hold confirmed but reversion loading against you; tighten
- "Legit Squeeze" + "Chopperoni" + convergence +/-5 = compressed energy, directional break coming
- Regime Factor +0.7 but Curve flattening = regime decelerating; leading signal of rollover
ALERTS
Regime Pivot fires when the Regime Factor crosses +/-0.25 with volatility band confirmation; solid arrows on chart. Built around the sweet spot: fires at the regime shift, not after the move has run. Spike Revert fires on mean reversion after blow-off; counter-trend edge from extreme overextension. Toggle each independently. For notifications without webhooks: condition = this indicator, "Any alert() function call", select push/email/popup. For webhook execution: paste endpoint URL, set Open-ended, create.
REGIME FACTOR THRESHOLD ZONES
+0.6 to +1.0 strong bullish (solid green hline)
+0.2 to +0.6 moderate bullish (dotted line)
-0.2 to +0.2 sweet spot entries (dim white circles); XO/XU here
-0.6 to -0.2 moderate bearish (dotted line)
-1.0 to -0.6 strong bearish (solid red hline)
DASHBOARD (9 rows)
1. MACRO PIVOT - Green: Pivoting ↑, Lc ↗ (confirmed), L In Play ↗. Red: inverse. Black: neutral.
2. ROC FILTER - Bright Green: Momentum ↑. Green: Trending ↗ / Rolling Over ↓. Yellow: Continuation / Stage 1 / Reversion. Orange: Exhaustion. White: Sideways. Red/Bright Red: inverse.
3. ADXVMA - Green: D Trend ↗, Trending ↗, Early Bull. Yellow: Pivoting, Consolidation, Chopperoni. Red: inverse.
4. OBVIX - Green: positive. Red: negative. Black: flat.
5. CONVERGENCE - Bright Green: All Lined Up ↑ (7/7). Gradient green: +5 to +6. Dim: +3 to +4. Black: near 0. Red gradient: inverse.
6. MEAN REVERSION - Yellow: Blow-Off, High Potential, Possible. Green: Spike Revert ↑ / MR In Play ↗. Red: inverse.
7. LEVELS - Green: Bouncing key MAs, XO events. Red: Rejecting, XU events. MA combo: above/below 50d, 100d, 200d + 10w anchor.
8. MECHANICAL HOLD - Squeeze gradient: Legit Squeeze / Squeezing. Green: Hodl L. Red: Hodl S. Black: Get Ready / Neutral.
9. REGIME FACTOR - Composite score with gradient color and numeric display.
CREDITS
ADXVMA: Linnsoft
ADX: J. Welles Wilder (1978)
VIDYA: Tushar S. Chande, TASC March 1992
Advance/Decline gradient: LucF
Turtle breakout concept: Richard Donchian Indicator

AG Pro VWMA Dislocation Map [AGPro Series]AG Pro VWMA Dislocation Map
OVERVIEW
AG Pro VWMA Dislocation Map is a state-based charting tool designed to measure how far price is trading from its volume-weighted mean, how persistent that displacement has become, and whether the move is still expanding or beginning to normalize.
This script is built around a simple but often underexplored idea: distance from a moving average is not equally meaningful in all situations. A small deviation can matter when it is persistent and building under directional participation, while a larger deviation can become less informative when the move is already mature and beginning to contract. Instead of treating every separation from the mean as identical, this script organizes that behavior into a structured framework.
The result is a visual map centered on VWMA behavior rather than a classic crossover model. The goal is not to guess tops or bottoms, and it is not to replace broader market structure analysis. The goal is to help the user read displacement quality, persistence, and normalization pressure around a volume-weighted equilibrium reference.
This makes the script useful in two very different but related contexts. In intraday use, it can help identify when a move is still building away from the mean versus when extension may already be mature. In swing use, it can help frame whether price is holding a healthy distance from its weighted mean or rotating back toward equilibrium.
WHAT MAKES IT DIFFERENT
This script is not presented as “another moving average” and it is not intended to function as a simple VWMA trend filter. Its design focus is the behavior around VWMA, not the line by itself.
The main distinction is the state model. Instead of reducing the chart to a binary above/below interpretation, the script tracks whether displacement is mild, active, persistent, extended, overextended, re-approaching, or rebalanced. That adds context to moves that may otherwise look similar at first glance but are materially different in maturity and behavior.
A second distinction is normalization. Raw distance in price units can be misleading across different symbols, different volatility conditions, and different phases of the same market. For that reason, the script evaluates displacement relative to a normalization unit rather than using absolute price distance alone. This is intended to make the map more comparable and more structurally meaningful.
A third distinction is presentation. The indicator is designed as a chart-reading framework, with a central weighted-mean structure, layered displacement bands, background state context, a last-bar state label, and a compact information panel. The output is meant to be descriptive and contextual rather than promotional or predictive.
METHODOLOGY
The script begins with a VWMA reference built from user-defined length and source settings. Around that reference, it measures normalized price displacement. The normalization can be based on ATR, standard deviation, or a hybrid approach, depending on the selected mode.
From there, the script derives several internal components:
1. Distance
This reflects how far price is trading from the VWMA after normalization. The purpose is to measure relative displacement rather than raw tick or point difference.
2. Persistence
This tracks how long the current directional displacement has remained active. A move that has stayed consistently above or below the weighted mean for multiple bars may carry a different interpretation than a one-bar separation.
3. Expansion
This evaluates whether the displacement is still building. Rising displacement can indicate that price is not merely away from the mean, but continuing to separate from it.
4. Normalization
This evaluates whether the displacement is beginning to contract toward the mean. It does not forecast reversal by itself. It is intended to show whether the existing separation is losing expansion pressure and moving into a more balanced phase.
5. Regime
The script also classifies contextual slope behavior into a simplified regime reading. This is not meant to be a full market regime engine. It is a compact contextual aid for distinguishing broader trend-like conditions from quieter or more balanced environments.
These components feed the state engine and the panel metrics. The result is not a claim of certainty, but a structured way to read where price is operating relative to a volume-weighted center.
STATE MODEL
The indicator organizes behavior into discrete chart states. These states are designed for interpretation, not for deterministic outcome prediction.
Balanced
Price is trading close to the VWMA and displacement is limited.
Early Dislocation
Price is beginning to separate from the weighted mean, but the move is still in an early stage.
Persistent Dislocation
Distance is no longer only emerging; it has remained active for a more sustained period.
Extended
The move has reached a stronger separation from the mean and may require more caution in interpretation.
Overextended
Displacement is extreme relative to the current normalization model. This does not mean price must reverse immediately. It indicates an elevated extension condition.
Re-approaching
Distance is beginning to contract and the move may be rotating back toward VWMA equilibrium.
Rebalanced
Price has moved back toward the mean after a prior displacement phase.
The practical value of this model is that it helps separate fresh movement from mature movement. Two charts can both be above VWMA, but one may be in an early building phase while another may already be extended and normalizing.
HOW TO READ THE PANEL
The information panel is designed to provide a quick summary of the current state without overwhelming the chart.
Score
A composite reading of displacement behavior. This is a contextual score, not a performance metric and not a probability estimate.
Bias
A directional summary based on price relative to VWMA.
Regime
A simplified context tag derived from the weighted-mean behavior.
Distance
The current normalized displacement from VWMA.
Persistence
The number of bars associated with the current directional displacement run.
Normalization
A compact measure of contraction pressure toward the weighted mean.
Footer interpretation
A short descriptive line showing the current qualitative state context and whether displacement is expanding or contracting.
The panel is intended to summarize current conditions, not to replace full chart reading.
VISUAL STRUCTURE
The chart output is designed to be read in layers.
The central weighted-mean structure provides the equilibrium reference.
The inner visual structure highlights the core region around VWMA.
The displacement bands expand outward to show increasingly stretched conditions relative to the normalization thresholds.
The background tint provides a broad state cue so users can quickly identify periods of balance, active displacement, or higher extension.
The last-bar state label is included to make the current state readable at a glance without scanning the full panel.
This layered design is intentional. It allows the script to remain visually expressive while still communicating a hierarchy: center, displacement, extension, and normalization.
HOW THIS TOOL MAY BE USED
Some users may apply the script as a continuation context tool. In that workflow, the focus is less on exact entries and more on whether a move is still developing in a healthy way away from the weighted mean.
Some users may apply it as an extension-awareness tool. In that workflow, the purpose is to identify when a move may already be mature and when aggressive continuation assumptions deserve more caution.
Others may use it as a mean-normalization context tool. In that workflow, the interest is not whether price is simply above or below VWMA, but whether the separation is holding, expanding, or rotating back toward equilibrium.
Because of this flexibility, the script is not restricted to one market style. It can be used as an analytical overlay in trending markets, in rotational conditions, or as part of a broader discretionary review process.
SIGNALS AND ALERTS
The script includes alerts tied to state transitions and context changes. These alerts are descriptive events based on the model, not trade promises.
Persistent Dislocation
Triggers when the script enters the Persistent Dislocation state.
Extended
Triggers when the script enters the Extended state.
Overextended
Triggers when the script enters the Overextended state.
Re-approaching
Triggers when the script enters the Re-approaching state.
Rebalanced
Triggers when price rotates back toward the weighted mean after prior displacement.
Score Threshold Cross
Triggers when the composite score crosses above the user-defined threshold.
Bias Flip
Triggers when directional bias flips across VWMA.
These alerts are intended to support monitoring and workflow organization. They should be interpreted in the context of the broader chart.
KEY INPUTS
VWMA Length
Controls the length of the volume-weighted mean.
Normalization Mode
Selects whether normalized displacement is built from ATR, standard deviation, or a hybrid of the two.
Normalization Length
Controls the lookback used in the normalization engine.
Distance Smoothing
Adjusts smoothing applied to the displacement behavior.
Regime Lookback
Controls the lookback used in the regime context calculation.
State Thresholds
Define how mild, active, strong, and extreme displacement are classified.
Persistence Confirmation Bars
Helps distinguish brief separation from more sustained displacement.
Re-Approach Confirmation Bars
Controls how quickly the script recognizes contraction back toward the mean.
Visual Settings
Allow the user to manage bands, background context, VWMA visibility, line strength, opacity behavior, and label placement.
Panel Settings
Allow layout, position, theme, and text sizing adjustments.
The script is intended to be configurable so the same framework can be adapted to different symbols and timeframes without changing its core logic.
LIMITATIONS AND TRANSPARENCY
This script does not predict future price direction.
It is not a standalone trading system, not an execution engine, and not a substitute for full chart analysis.
A strong displacement can remain strong for longer than expected. An overextended reading does not guarantee immediate reversal. A re-approaching or rebalanced state does not guarantee that a larger directional move has ended.
Like any normalized framework, the output depends on the settings chosen by the user. Different symbols, timeframes, volatility environments, and threshold selections can meaningfully change the visual behavior and state classification.
The script should be understood as a descriptive map around a volume-weighted mean, not as a promise of edge by itself.
RISK DISCLOSURE
This indicator is for analytical and educational charting use only.
It does not provide financial advice, investment advice, or guaranteed outcomes.
All trading and investing involve risk. Users should evaluate any signal, state change, or alert in the context of their own process, market conditions, risk controls, and independent judgment.
AG Pro VWMA Dislocation Map is designed to help structure interpretation around VWMA displacement behavior. It is not designed to remove uncertainty from markets, and it should not be used as the sole basis for financial decisions.
Indicator

AG Pro CCI Reversion Quality [AGPro Series]AG Pro CCI Reversion Quality
Overview
AG Pro CCI Reversion Quality is a chart-based analysis framework designed to evaluate the quality of potential mean reversion conditions after meaningful CCI displacement. The script is not built around the simplistic idea that every overextended reading should immediately reverse. Instead, it focuses on whether a stretch condition begins to mature into a more structured, readable, and context-aware reversion environment.
The core objective is to separate raw CCI extremes from higher-quality reversion candidates. In many conventional oscillator workflows, a high positive or negative CCI reading is treated as a direct trigger. This script does not follow that approach. A strong stretch may still reflect healthy continuation, trend persistence, or unstable counter-trend conditions. For that reason, the script evaluates the quality of the reversion setup rather than the existence of a threshold breach alone.
The indicator is built for users who want a more selective framework around mean reversion. It examines whether price has deviated enough from an EMA-based reference mean, whether the reversion path remains meaningful, whether trend pressure is working against the setup, and whether recent structure suggests a cleaner or more crowded return path. The output is a contextual quality view rather than a one-dimensional overbought or oversold label.
This means the script should be understood as a decision-support tool for chart study and workflow organization. It is intended to help users distinguish between conditions that are immature, weak, blocked, developing, or stronger within a mean reversion context. It does not guarantee that price will reverse, and it does not assume that every stretch condition deserves a fade.
What the script does
The script monitors CCI displacement and then evaluates whether that displacement is beginning to convert into a more credible reversion environment. In practical terms, the workflow asks a sequence of questions. First, is there a meaningful stretch? Second, is the move beginning to lose directional quality or show reversion readiness? Third, is there enough room back toward the mean to matter? Fourth, is dominant trend pressure still strong enough to reduce the attractiveness of fading the move? Fifth, is nearby structure relatively clean, or is the path crowded by congestion and repeated mean interaction?
By combining those layers, the script attempts to reduce the noise associated with raw oscillator threshold logic. A positive stretch does not automatically imply a short setup. A negative stretch does not automatically imply a long setup. The script instead checks whether the overall reversion context is becoming more coherent.
This framework can be useful in discretionary workflows where users want to prioritize cleaner mean reversion candidates over mechanically reacting to every extreme oscillator reading. It is also useful for users who prefer a visual structure that summarizes context rather than one that continuously emits aggressive directional prompts.
Unique edge
The unique edge of this script is that it treats CCI as the starting point of the analysis, not the end point. Many oscillator-based studies stop at the detection of an extreme value. AG Pro CCI Reversion Quality continues beyond that stage and asks whether the extreme is maturing into a higher-quality reversion environment.
This makes the tool different from a basic CCI threshold script, a classic overbought/oversold marker, or a simple cross-based reversal detector. The script is not designed to label every extreme. It is designed to grade the environment around the extreme.
The indicator also keeps a clear distinction between stretch direction and stretch intensity. A market may be in a positive stretch or a negative stretch, but the degree of that stretch can still vary between mild, extended, and extreme conditions. In parallel, the script separately estimates reversion quality, trend pressure against the reversion idea, distance back to the reference mean, and structural friction. This multi-layered structure is meant to help users avoid treating all extreme readings as equivalent.
Another important difference is that the script explicitly accounts for context that can weaken a counter-trend reversion idea. Strong directional pressure, repeated interactions with the mean, and crowded local structure can all reduce the clarity of a fade. Instead of ignoring those conditions, the model reflects them in the displayed quality state.
Methodology
The script begins with a CCI calculation and identifies whether price is in a neutral regime, a positive stretch regime, or a negative stretch regime. It then classifies stretch intensity according to threshold-based displacement logic. The purpose of this stage is to define whether the market is extended enough for reversion analysis to become relevant.
From there, the indicator evaluates reversion readiness. This layer looks for signs that the stretch may be beginning to lose directional quality. Rather than relying on one isolated condition, the readiness component blends several pieces of information, such as directional change in CCI behavior, body structure, wick behavior, and simple stalling characteristics. This is meant to produce a broader view of whether reversion conditions are starting to organize.
The model then evaluates distance to mean. This matters because a reversion concept is less meaningful if price is already too close to the reference mean, while a more meaningful opportunity may exist when displacement remains materially extended. The reference anchor used here is an EMA-based mean, and the script also visualizes an ATR-based reversion zone around that mean.
Trend pressure is treated as a separate contextual penalty. This is a key design choice. A mean reversion idea that opposes strong directional pressure may be materially weaker than a similar stretch in a less forceful trend environment. The script therefore estimates how much prevailing directional pressure works against the reversion idea and reduces the effective quality view accordingly.
Structure friction is also included. This component is intended to reflect whether the recent path is relatively clean or crowded. Repeated interaction with the mean, compression, and congestion can reduce the clarity of a reversion path. Instead of assuming that all distance from the mean is equally attractive, the script attempts to reflect when the path back toward the mean is noisy or structurally inefficient.
All of these elements are combined into a composite Reversion Quality view. The final output is then expressed through panel information, chart labels, the zone display, and state logic.
State model
The state model is intentionally selective. It is meant to help users read context, not flood the chart with constant directional calls.
NEUTRAL indicates that there is no active stretch regime currently qualifying for reversion analysis.
WATCH indicates that a stretch exists and some reversion characteristics are forming, but the overall quality remains in an earlier or less mature stage.
READY indicates that the reversion quality has advanced enough to meet the preferred threshold defined by the user inputs. This does not imply certainty or guaranteed reversal. It simply means that the model sees a stronger monitored reversion context than it did at lower-quality states.
WEAK indicates that a stretch may exist, but the quality remains below the preferred threshold. This state is intentionally treated with caution.
BLOCKED indicates that the environment is materially impaired by elevated opposing pressure or structural friction. In other words, the stretch may exist, but the model does not consider the reversion context clean enough.
These states are designed to provide a workflow hierarchy rather than a promise hierarchy. The purpose is to help users prioritize and interpret, not to replace judgment.
Visual structure
The reference mean is displayed as an EMA-based mean line. Around it, the script plots an ATR-based reversion zone. This zone is intended to help users see the region surrounding the mean that is being used as the reversion anchor. The zone becomes more visually expressive when an active stretch context is present and more neutral when no active stretch is in focus.
The on-chart labels are designed to show the dominant local state when relevant. Depending on user settings, the script can display WATCH, READY, BLOCKED, and optionally WEAK labels. The label system is filtered by spacing logic so the chart remains more readable and does not endlessly repeat the same message on adjacent bars.
The information panel summarizes the active context. It is designed to show state, current reversion side, stretch direction, stretch intensity, reversion quality, trend pressure versus reversion, distance to mean, structure friction, setup bias, and a short risk note. The panel can also be repositioned from the settings, allowing the user to adapt placement to chart layout and personal preference.
The chart guide labels are included to make the mean and zone easier to identify visually. Their role is descriptive, not predictive.
Signals and alerts
The alert structure is built around monitored reversion states rather than trading promises. The available alert conditions include Ready Long Reversion, Ready Short Reversion, Watch Long Reversion, Watch Short Reversion, Reversion Quality Upgrade, and Reversion Quality Breakdown.
These alerts are designed to notify the user that the modeled reversion environment is changing. They should not be interpreted as guaranteed turning points. The script does not know future price behavior and does not claim to identify all reversals. It only identifies conditions that fit its internal reversion-quality logic.
Because different assets, sessions, and volatility structures behave differently, users should always validate whether the alert behavior matches their own chart-reading process and timeframe preference.
Key inputs
The script includes inputs for CCI length, reference mean length, multiple stretch thresholds, READY and WATCH thresholds, trend pressure filter strength, structure friction lookback, reversion zone width, label spacing, background highlight transparency, and visual display controls.
These inputs are intended to let users adapt the framework to different instruments and chart conditions. The script is not presented as universally optimal out of the box for all markets or all styles. Some users may prefer a more selective threshold structure, while others may prefer earlier WATCH states. Similarly, different assets may respond differently to the same mean length or zone width.
The visual controls are included to help users keep the chart readable. Users can enable or disable signal labels, WATCH labels, WEAK labels, background highlights, guide labels, and the information panel. Label size and panel text size are also configurable.
How to interpret the tool
A useful way to interpret the script is to think of it as a contextual filter around reversion conditions. A high stretch value alone is not enough. The quality concept becomes more meaningful when stretch, readiness, distance to mean, and contextual penalties begin to align.
If the script is neutral, it is signaling that no active stretch regime is currently in focus. If it is in WATCH, the script sees an emerging reversion environment, but one that may still be early or incomplete. If it reaches READY, the model is identifying a stronger monitored reversion context according to its current thresholds. If the state is BLOCKED, the model is emphasizing that pressure or structure is reducing the attractiveness of the reversion idea.
The panel is especially helpful for separating why a setup is weak. In some cases, quality may be limited because distance to mean is too thin. In other cases, trend pressure may still be high. In others, structure friction may be elevated even if displacement exists. This decomposition is intentional because it gives the user a more transparent framework than a single opaque signal.
What this script is not
This script is not a simple CCI threshold indicator. It is not designed to mark every move above or below a fixed level as a reversal opportunity.
It is not a guaranteed turning-point detector. Markets can remain extended for longer than expected, and strong trends can continue even after oscillator readings become extreme.
It is not a standalone execution system. The script does not account for all trade management variables, liquidity considerations, news catalysts, slippage, or user-specific risk parameters.
It is not a substitute for independent chart reading. It is intended to support analysis, not replace it.
Limitations and transparency
Like any chart-based model, this script has limitations. CCI extremes can persist, and a stretch can remain extended longer than a reversion-focused framework may prefer. In strong continuation phases, what appears to be a mature stretch can still fail to revert meaningfully.
The reversion-quality approach is also sensitive to the interaction between volatility, price structure, and trend behavior. Different markets can produce different behavior profiles. A configuration that feels balanced on one asset or timeframe may feel too early or too conservative on another.
The structure friction layer is an estimate, not an objective statement of future path quality. The trend pressure component is likewise a contextual model, not a certainty model. The script uses observable chart information to organize conditions, but it does not predict future order flow.
Users should also understand that visualization choices are meant to improve readability, not imply certainty. The mean line, reversion zone, state labels, and background highlights are interpretive aids.
Risk disclosure
This script is provided for chart analysis, research, and workflow support. It does not provide financial, investment, legal, or tax advice. Nothing displayed by the script should be interpreted as a promise of outcome or a guarantee of reversal.
All markets involve risk. Mean reversion concepts can fail, continuation can persist, and volatility conditions can change rapidly. Users should apply independent judgment, appropriate risk controls, and broader market context before acting on any chart-based interpretation.
The script should be used as one analytical layer among many, not as a self-sufficient decision engine.
Summary
AG Pro CCI Reversion Quality is a selective mean reversion quality framework built around CCI displacement, EMA-based mean reference logic, distance-to-mean context, trend pressure, and structure friction. Its purpose is not to say that every extreme should fade. Its purpose is to help identify when an extreme begins to organize into a more structured reversion environment.
The model is intended for users who want a cleaner, more context-aware interpretation of stretch conditions than a traditional threshold-only oscillator can provide. By separating stretch direction, stretch intensity, reversion quality, and contextual penalties, the script aims to make mean reversion analysis more structured, more transparent, and more selective.
Indicator

Indicator

Indicator

Strategy

Indicator

Indicator

Adaptive Linear Regression Structure [MarkitTick]💡 This indicator, is a sophisticated analytical tool designed to bridge the gap between classical statistical modeling and modern price action theory. By leveraging high-performance Ordinary Least Squares (OLS) calculations, it dynamically identifies the most statistically significant market structures—specifically linear regression channels—based on historical pivot points. Unlike static channels that rely on arbitrary lookback periods, this script scans a historical "horizon" of structural pivots to find the model with the highest mathematical "fit," providing traders with a non-repainting, objective view of trend exhaustion and volatility boundaries.
✨ Originality and Utility
● Dynamic Model Selection
Most linear regression indicators require the user to manually define a start and end point, or they use a fixed lookback period. This script is original because it treats the starting point of the regression as a variable. It scans multiple historical pivots (Highs and Lows) and performs a competitive analysis between different potential channels. The channel that is eventually displayed is the one that achieves the highest performance score, calculated via a combination of the Coefficient of Determination ($R^2$) and the natural log of the duration. This ensures the channel is both mathematically reliable and structurally relevant.
● Market Structure Integration
The utility of the indicator is enhanced by its "Market Structure Registry." Instead of calculating regressions on every single bar blindly, the script identifies "Pivot Highs" and "Pivot Lows" to use as anchors. This aligns the statistical modeling with the way professional traders view the market, focusing on major turning points rather than noise.
● Institutional-Grade Telemetry
The inclusion of a real-time HUD (Heads-Up Display) dashboard provides traders with immediate transparency into the model's health. By displaying the $R^2$ value and Z-Score, the indicator moves beyond simple "lines on a chart" and offers a quantitative assessment of how well the current price action respects the established trend.
🔬 Methodology and Concepts
● The OLS Kernel
At the heart of the script is a custom-built OLS (Ordinary Least Squares) method. It calculates the slope ($\beta$) and the intercept ($\alpha$) of the best-fit line through the closing prices of the selected period. The mathematical goal is to minimize the sum of the squared errors ( LSE:SSE $), ensuring the median line represents the "true" equilibrium of price over that duration.
● Heuristic Performance Scoring
The indicator does not just look for the highest correlation. It uses a "Performance Score" heuristic:
Score = $R^2$ * ln(Duration)
This formula rewards models that maintain a high degree of linearity over longer periods. A short-term channel with a high $R^2$ might be dismissed in favor of a long-term channel that has a slightly lower $R^2$ but significantly more structural weight.
● Volatility-Adjusted Envelopes
The upper and lower boundaries are not arbitrary. They are calculated based on the standard deviation of the residuals (the distance between actual price and the regression line). By applying a user-defined "Deviation Factor," the script creates volatility bands that expand or contract based on how "noisy" the trend is.
🎨 Visual Guide
● The Regression Channel
• Median Vector: A solid line representing the linear mean of the current trend. It is colored Cyan for bullish slopes and Orange for bearish slopes.
• Volatility Bands: Two solid lines flanking the median. These represent the "Deviation Factor" boundaries (defaulting to 2.0 standard deviations).
• Fill Core: A transparent background fill between the upper and lower bands, allowing for easy visualization of the "fair value" zone. The color dynamically shifts between Cyan and Orange based on the trend bias.
● Signal Labels
• LONG Labels: Cyan labels appearing below price when a "Mean Reversion" setup is detected (price crossing above the lower band).
• SHORT Labels: Orange labels appearing above price when a "Mean Reversion" setup is detected (price crossing below the upper band).
• Details: Labels include the Entry Price (EP), Take Profit (TP) at the median, and a suggested Stop Loss (SL).
● Telemetry Dashboard (HUD)
• Model Quality (R²): A value between 0.0 and 1.0. Values above 0.7 indicate a very strong trend.
• Trend Bias: Explicitly states "BULLISH" or "BEARISH."
• Deviation (Z-Score): Measures how many standard deviations the current price is away from the mean.
• Duration: Displays how many bars the current model covers.
📖 How to Use
● Mean Reversion Strategy
The primary use case is identifying overextended price action. When price moves outside the volatility bands (high Z-Score) and then crosses back inside, it suggests a return to the median "equilibrium" price.
• Bullish Entry: Look for a Cyan "LONG" label when price recovers from the lower band.
• Bearish Entry: Look for an Orange "SHORT" label when price pulls back from the upper band.
● Trend Strength Assessment
Use the $R^2$ value in the dashboard to filter trades. If the $R^2$ is low (e.g., below 0.5), the market is in a "Random Walk" phase, and the regression lines may be less reliable. High $R^2$ values suggest a "Trending" phase where the channel boundaries act as significant support and resistance.
● Dynamic Take Profits
The median line (the Cyan/Orange vector) serves as a dynamic take-profit target. Since the line is based on a linear slope, the price target adjusts every bar to reflect the ongoing trend.
⚙️ Inputs and Settings
● Algorithmic Core
• Scan Horizon: Determines how many historical pivots the script should evaluate. A higher number increases the "search depth" but requires more processing.
• Deviation Factor: Controls the width of the channel. A value of 2.0 covers approximately 95% of price action if the distribution is normal.
• Structural Sensitivity: Controls the lookback for the Pivot High/Low detection. Smaller values find more "local" structures; higher values find "major" structures.
● Signal Processing
• Quality Threshold (R²): This is a "gatekeeper" setting. If no model reaches this minimum quality, the indicator will not display a channel, protecting the user from weak or chaotic patterns.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Statistical Basis (OLS)
The indicator is grounded in the Gauss-Markov theorem. By calculating the slope via the covariance of time and price divided by the variance of time, it provides the "Best Linear Unbiased Estimator" (BLUE) of the current price trajectory.
● Information Theory & Heuristics
The scoring mechanism (using the natural log of N) draws inspiration from Information Criteria (like AIC or BIC). In statistical modeling, increasing the sample size ($N$) usually improves the model's reliability but can introduce "lag." By using the log of duration, the script balances the benefit of a larger sample size against the need for current relevance.
● Standardized Residuals (Z-Scores)
The "Z-Metric" displayed in the dashboard is a calculation of:
$Z = (Price - Estimated Price) / Standard Error$
This standardizes the distance of price from the mean across different assets and timeframes, allowing for a universal interpretation of "overbought" or "oversold" conditions based on the specific volatility of the current trend.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator
