OPEN-SOURCE SCRIPT
Обновлено Dynamic Acceptance Channel [AGPro Series]

Dynamic Acceptance Channel [AGPro Series]
🔷 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.
🔷 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.
Информация о релизе
🔧 UPDATE NOTES - V1.1This update focuses on readability, visual hierarchy, channel interpretation, and publication-quality presentation.
The core purpose of the script remains unchanged.
This release improves how the existing acceptance-channel logic is presented, organized, and interpreted on the chart.
This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
• Refined the script identity and publication format
The script title now follows the updated AGPro Series naming standard while the panel title keeps the AG Pro brand format.
• Added an active channel zone
The live acceptance channel now includes a soft active zone across recent price action, making the current acceptance area easier to understand at first glance.
• Added a centered channel label
The active channel now displays a centered label inside the zone showing the current acceptance state and width regime.
• Improved reaction labeling
Upper Breach, Lower Breach, Upper Respect, and Lower Respect labels are spaced and limited to reduce clutter while keeping the chart alive.
• Added width-rank context
The panel now includes a normalized width rank so users can quickly see whether the channel is relatively compressed, normal, or expanded.
------------------------
Visual Improvements
------------------------
• Improved chart readability by using a cleaner active channel zone
• Reduced visual clutter through label spacing and visible-label limits
• Refined the channel hierarchy so upper, lower, fill, zone, and live state each have a clear role
• Adjusted label placement so reaction labels sit outside candles rather than being embedded between bars
• Added right-edge Upper and Lower tags for faster channel reading
------------------------
Interface & Usability
------------------------
• Rebuilt the panel with the standard single merged blue header row
• Added configurable panel theme, panel location, panel font size, and label font size
• Added label density control for Minimal, Balanced, or Detailed historical context
• Improved panel flow with State, Width Regime, Width Rank, Width, Model, and Upper / Lower values
• Kept default settings balanced for a cleaner public screenshot without making the chart look empty
------------------------
Behavior Notes
------------------------
This update does not change the core analytical purpose of the script.
The goal is to improve clarity and usability, not to introduce predictive behavior.
Users should interpret outputs the same way as before, but with improved visual structure and stronger first-glance context.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, timeframe selection, and fast regime changes may affect how channel breaches and respect events appear.
Outputs should always be interpreted within broader market context.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
Информация о релизе
UPDATE NOTES - V1.2This update focuses on visual clarity, publication polish, and cleaner default chart hierarchy.
The core purpose of the script remains unchanged.
This release improves how the existing adaptive acceptance channel is presented, organized, and interpreted on the chart.
This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
* Cleaner default publication view
Breach markers, edge tags, and regime transition labels are now optional but disabled by default to reduce visual noise.
* Improved active channel badge
The live channel badge now uses a centered label style and contrast-safe text so it reads more like a premium zone badge.
* Softer active zone
The active channel zone is lighter by default and no longer competes as heavily with candles.
* Better label spacing
Reaction label spacing was increased to reduce repeated labels during active channel movement.
* Expanded panel location support
The panel location input now supports top, middle, and bottom center positions in addition to corner placements.
------------------------
Visual Improvements
------------------------
* Reduced chart clutter by simplifying default markers and tags.
* Improved first-glance readability by making the adaptive channel the main visual layer.
* Kept the centered channel badge inside the active channel zone.
* Adjusted colors and contrast so badge text remains readable.
------------------------
Interface & Usability
------------------------
* Preserved panel show/hide, theme, location, and font-size controls.
* Preserved label density, label size, breach marker, edge tag, regime label, bar tint, and alert controls.
* Added a zone transparency control for tuning the active channel zone.
* Maintained all core adaptive engine settings.
------------------------
Behavior Notes
------------------------
This update does not change the adaptive midpoint, width model, regime model, breach logic, respect logic, or alerts.
The goal is to improve clarity and usability, not to introduce new predictive behavior.
Users should interpret outputs the same way as before, but with improved visual structure.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, timeframe differences, and abnormal candle behavior may affect how the channel appears.
Outputs should always be interpreted within broader market context.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
Информация о релизе
UPDATE NOTES - Version 1.3This update focuses on adding a confirmation-anchored proof layer to the acceptance channel.
The core purpose of the script remains unchanged.
This release adds a proof layer that measures how often channel breaches were accepted and
continued before price reverted to the fair value midline.
This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
* Added a Proof Layer (Follow / Hold / React / Flip)
The panel now reports how reliably channel breaches were accepted on the current symbol and
timeframe. Each time the channel is breached, that breach is tracked forward over a configurable
horizon, with the breach close as the entry, the fair value midline as the reversion reference,
and a one risk unit (1R) continuation target set one channel-half beyond the breach:
- Follow Rate : share of breaches that continued one risk unit (were accepted beyond the edge)
before price reverted to the midline
- Hold Rate : share that did not revert to the midline through resolution
- React Rate : share that produced an early favorable continuation reaction
- Flip Rate : share that reverted to the fair value midline within the horizon (mean reversion)
A sample size (n) is shown so the rates are read in context, and they display as "building" only
until the first breach resolves. This turns the channel into a clearer acceptance decision tool:
it shows the base rate of breaches running versus fading on the current market.
* Added hidden proof outputs
Follow, Hold, React, and Flip rates are exported as hidden plots so they can be used in alerts
and screeners without adding chart clutter.
------------------------
Visual Improvements
------------------------
* Preserved the adaptive channel, regime-colored fill, active channel zone with its centered
acceptance badge, reaction labels, and optional edge tags and markers.
* Kept label density controlled with the existing reaction spacing and retained-label limits.
* Added the proof rows to the panel under a clear sub-header so the channel read and the proof
read stay visually separated.
------------------------
Behavior Notes
------------------------
This update does not change the core channel logic of the script.
The proof rates are descriptive statistics of channel breaches on the current symbol and
timeframe. They measure how often a breach was accepted and continued one risk unit before
reverting to the midline, not trade performance, and they do not change how the channel,
midline, width regime, rank, breaches, or respect reactions are produced.
Users should interpret outputs the same way as before, now with added reliability context.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Proof rates depend on the available history and on how many breaches occurred on the current
symbol and timeframe; a small sample (low n) should be treated with caution. Each breach is
counted once, with the breach close entry, midline reversion reference, and 1R continuation
target frozen at the breach bar. Market conditions such as volatility, liquidity, and timeframe
differences may affect how breaches and rates appear.
Outputs should always be interpreted within broader market context.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Public-free scripts + invite-only AGPro workflows for market analysis, liquidity context, risk planning and execution review.
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Public-free scripts + invite-only AGPro workflows for market analysis, liquidity context, risk planning and execution review.
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.