OPEN-SOURCE SCRIPT
Actualizado Abyss Protocol One

Abyss Protocol One — Momentum Exhaustion Trading System
Overview
Abyss Protocol One is a momentum exhaustion indicator designed to identify high-probability reversal points by detecting when price momentum has reached extreme levels. It combines Chande Momentum Oscillator (CMO) threshold signals with dynamic volatility-adjusted bands and multiple protective filters to generate buy and sell signals.
Core Concept
The indicator operates on the principle that extreme momentum readings (CMO reaching ±80) often precede mean reversion. Rather than chasing trends, Abyss Protocol waits for momentum exhaustion before signaling entries and exits.
Key Components
1. Dynamic Bands (Money Line ± ATR)
Center line uses linear regression (Money Line) for smooth trend representation
Bands expand and contract based on Bollinger Band Width Percentile (BBWP)
Low volatility (BBWP < 30): Tighter bands using lower multiplier
High volatility (BBWP > 70): Wider bands using higher multiplier
Bands visually adapt to current market conditions
2. CMO Exhaustion Signals
BUY Signal: CMO drops below -80 (oversold/momentum exhaustion to downside)
SELL Signal: CMO rises above +80 (overbought/momentum exhaustion to upside)
Thresholds are configurable for different assets and timeframes
3. ADX Filter
Signals only fire when ADX exceeds minimum threshold (default: 22)
Ensures there's enough directional movement to trade
Prevents signals during choppy, directionless markets
4. Band Contraction Filter
Calculates band width percentile rank over configurable lookback
When bands are contracted (below 18th percentile), ALL signals are blocked
Prevents trading during low-volatility squeeze periods where breakout direction is uncertain
5. Consecutive Buy Limit
Maximum of 3 consecutive buys allowed before a sell is required
Prevents overexposure during extended downtrends
Counter resets when a sell signal fires
6. Underwater Protection
Tracks rolling average of recent entry prices (last 10 entries within 7 days)
Blocks sell signals if current price is below average entry price
Prevents locking in losses during drawdowns
7. Signal Cooldown
Minimum 5-bar cooldown between signals
Prevents rapid-fire signals during volatile swings
8. Extreme Move Detection
Detects when price penetrates beyond bands by more than 0.6 × ATR
Extreme signals can bypass normal cooldown period
Fire intra-bar for faster response to capitulation/blow-off moves
Still respects max consecutive buys and underwater protection
Visual Features
Trend State Detection
The indicator classifies market conditions into six states based on EMA stack, price position, and directional indicators:
STRONG UP: Full bullish alignment (EMA stack + price above trend + bullish DI + ADX > threshold)
UP: Moderate bullish conditions
NEUTRAL: No clear directional bias
DOWN: Moderate bearish conditions
STRONG DOWN: Full bearish alignment
CONTRACTED: Bands squeezed, volatility low
ADX Trend Bar
Colored dots at chart bottom provide instant trend state visibility:
Lime = Strong Uptrend
Blue = Uptrend
Orange = Neutral
Red = Downtrend
Maroon = Strong Downtrend
White = Contracted
Volume Spike Highlighting
Purple background highlights candles where volume exceeds 2x the 20-bar average, helping identify institutional activity or significant market events.
Signal Labels
Buy labels show consecutive buy count (e.g., "BUY 2/3"), price, and CMO value
Sell labels show consecutive sell count, price, and CMO value
Extreme signals display in distinct colors (cyan for buys, fuchsia for sells)
Signal candles turn bright blue for easy identification
Info Panel
Real-time dashboard displaying:
Current trend state
CMO value with threshold status
CMO thresholds (buy/sell levels)
ADX with directional indicator (▲/▼) and signal eligibility
BBWP percentage
Buy/Sell counters
Average entry price (with underwater shield indicator 🛡 when protected)
Price position relative to Money Line
Band width percentile rank
Extreme move status
Signals status (OPEN/BLOCKED)
Recommended Use
Timeframe: 5-15 minute charts (parameters tuned for this range)
Best suited for: Assets with regular oscillations between overbought/oversold extremes
Trading style: Mean reversion, momentum exhaustion, scaled entries
Parameters Summary
Money Line Length: 12 — Smoothing for center line
ATR Length: 10 — Volatility measurement
Band Multiplier (Low/High Vol): 1.5 / 2.5 — Dynamic band width
CMO Length: 9 — Momentum calculation period
CMO Buy/Sell Threshold: -80 / +80 — Signal trigger levels
ADX Min for Signals: 22 — Minimum trend strength
Signal Cooldown: 5 bars — Minimum bars between signals
Max Consecutive Buys: 3 — Position scaling limit
Band Contraction Threshold: 18th %ile — Low volatility filter
Band Contraction Lookback: 188 bars — Percentile calculation period
Extreme Penetration: 0.6 × ATR — Threshold for extreme signals
Overview
Abyss Protocol One is a momentum exhaustion indicator designed to identify high-probability reversal points by detecting when price momentum has reached extreme levels. It combines Chande Momentum Oscillator (CMO) threshold signals with dynamic volatility-adjusted bands and multiple protective filters to generate buy and sell signals.
Core Concept
The indicator operates on the principle that extreme momentum readings (CMO reaching ±80) often precede mean reversion. Rather than chasing trends, Abyss Protocol waits for momentum exhaustion before signaling entries and exits.
Key Components
1. Dynamic Bands (Money Line ± ATR)
Center line uses linear regression (Money Line) for smooth trend representation
Bands expand and contract based on Bollinger Band Width Percentile (BBWP)
Low volatility (BBWP < 30): Tighter bands using lower multiplier
High volatility (BBWP > 70): Wider bands using higher multiplier
Bands visually adapt to current market conditions
2. CMO Exhaustion Signals
BUY Signal: CMO drops below -80 (oversold/momentum exhaustion to downside)
SELL Signal: CMO rises above +80 (overbought/momentum exhaustion to upside)
Thresholds are configurable for different assets and timeframes
3. ADX Filter
Signals only fire when ADX exceeds minimum threshold (default: 22)
Ensures there's enough directional movement to trade
Prevents signals during choppy, directionless markets
4. Band Contraction Filter
Calculates band width percentile rank over configurable lookback
When bands are contracted (below 18th percentile), ALL signals are blocked
Prevents trading during low-volatility squeeze periods where breakout direction is uncertain
5. Consecutive Buy Limit
Maximum of 3 consecutive buys allowed before a sell is required
Prevents overexposure during extended downtrends
Counter resets when a sell signal fires
6. Underwater Protection
Tracks rolling average of recent entry prices (last 10 entries within 7 days)
Blocks sell signals if current price is below average entry price
Prevents locking in losses during drawdowns
7. Signal Cooldown
Minimum 5-bar cooldown between signals
Prevents rapid-fire signals during volatile swings
8. Extreme Move Detection
Detects when price penetrates beyond bands by more than 0.6 × ATR
Extreme signals can bypass normal cooldown period
Fire intra-bar for faster response to capitulation/blow-off moves
Still respects max consecutive buys and underwater protection
Visual Features
Trend State Detection
The indicator classifies market conditions into six states based on EMA stack, price position, and directional indicators:
STRONG UP: Full bullish alignment (EMA stack + price above trend + bullish DI + ADX > threshold)
UP: Moderate bullish conditions
NEUTRAL: No clear directional bias
DOWN: Moderate bearish conditions
STRONG DOWN: Full bearish alignment
CONTRACTED: Bands squeezed, volatility low
ADX Trend Bar
Colored dots at chart bottom provide instant trend state visibility:
Lime = Strong Uptrend
Blue = Uptrend
Orange = Neutral
Red = Downtrend
Maroon = Strong Downtrend
White = Contracted
Volume Spike Highlighting
Purple background highlights candles where volume exceeds 2x the 20-bar average, helping identify institutional activity or significant market events.
Signal Labels
Buy labels show consecutive buy count (e.g., "BUY 2/3"), price, and CMO value
Sell labels show consecutive sell count, price, and CMO value
Extreme signals display in distinct colors (cyan for buys, fuchsia for sells)
Signal candles turn bright blue for easy identification
Info Panel
Real-time dashboard displaying:
Current trend state
CMO value with threshold status
CMO thresholds (buy/sell levels)
ADX with directional indicator (▲/▼) and signal eligibility
BBWP percentage
Buy/Sell counters
Average entry price (with underwater shield indicator 🛡 when protected)
Price position relative to Money Line
Band width percentile rank
Extreme move status
Signals status (OPEN/BLOCKED)
Recommended Use
Timeframe: 5-15 minute charts (parameters tuned for this range)
Best suited for: Assets with regular oscillations between overbought/oversold extremes
Trading style: Mean reversion, momentum exhaustion, scaled entries
Parameters Summary
Money Line Length: 12 — Smoothing for center line
ATR Length: 10 — Volatility measurement
Band Multiplier (Low/High Vol): 1.5 / 2.5 — Dynamic band width
CMO Length: 9 — Momentum calculation period
CMO Buy/Sell Threshold: -80 / +80 — Signal trigger levels
ADX Min for Signals: 22 — Minimum trend strength
Signal Cooldown: 5 bars — Minimum bars between signals
Max Consecutive Buys: 3 — Position scaling limit
Band Contraction Threshold: 18th %ile — Low volatility filter
Band Contraction Lookback: 188 bars — Percentile calculation period
Extreme Penetration: 0.6 × ATR — Threshold for extreme signals
Notas de prensa
Abyss Protocol One v2 ChangesCMO Reversal Confirmation
Added a filter that requires the CMO to actually be reversing direction before signals fire. For buy signals, CMO must be rising (bottoming out). For sell signals, CMO must be falling (topping out). This prevents signals from firing while momentum is still accelerating in the wrong direction. The reversal lookback is configurable with a default of 3 bars. Extreme CMO readings (-90 or below for buys, +90 or above for sells) bypass this requirement since those represent capitulation or euphoria where waiting for reversal means missing the move.
Divergence Detection
Added bullish and bearish divergence detection between price and CMO. Bullish divergence occurs when price makes a lower low but CMO makes a higher low, indicating weakening selling pressure. Bearish divergence is the opposite — price makes a higher high but CMO makes a lower high. When detected, lines are drawn on the chart connecting the two pivot points. Green lines for bullish divergence, red for bearish. The "Divergence Boosts Signal" option allows divergence signals to bypass the normal cooldown period since these are higher-probability setups.
State Tracking Fix
Entry price tracking and consecutive signal counters now only update on bars within the last 24 hours. This prevents the indicator from loading with stale state from old historical signals, which was causing the system to appear stuck at max buys or underwater from entries that occurred weeks ago.
Panel Improvements
The signals status row now shows buy and sell status separately with reason codes. MAX indicates max consecutive buys reached, UW means sells are blocked by underwater protection, CONT means bands are contracted, and ADX means the ADX minimum threshold is not met. The CMO row now shows rising or falling arrows to indicate momentum direction. A new divergence row displays current divergence status.
Default Adjustments
Band contraction threshold increased from 18 to 24 percentile.
Notas de prensa
CMO Bar DisplayAdded a row of colored squares at the top of the chart showing CMO momentum state. The bar uses five distinct colors to indicate momentum zones: bright lime when CMO is in the buy zone at -80 or below, dark forest green when oversold between -50 and -80, light gray when neutral, orange when overbought between 50 and 80, and bright red when in the sell zone at 80 or above. This provides an at-a-glance view of momentum state across the entire chart without needing a separate indicator pane. The ADX trend bar remains at the bottom as colored circles, so both trend direction and momentum exhaustion are visible simultaneously.
Panel Color Consistency
Updated the CMO cell in the info panel to use the same five-zone color scheme as the CMO bar. Previously it only showed three states using bull, bear, or trend colors. Now the panel cell matches the bar exactly, providing consistent visual language between the chart and the info display.
Buy Label Readability
Changed text color on buy labels from white to black. The bright lime green background made white text difficult to read. Both regular buy labels and extreme buy labels now use black text for improved contrast and legibility.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.