OPEN-SOURCE SCRIPT
Market State

Identifies market regime (Expansion, Crawl, Compression, Reversion, Chop) using VWAP-based auction theory and volatility analysis.
Full Description:
This indicator combines Auction Market Theory with Volatility Regime Detection to classify the current market state and highlight key auction events.
🎯 Market States (Background Colors)
EXPANSION (lime) — Strong directional move, price outside value zone
CRAWL (green) — Trending move with price acceptance
REVERSION (orange) — Mean reversion back to value after deviation
COMPRESSION (blue) — Tight range, accumulation/distribution phase
CHOP (red) — Choppy, directionless price action
📍 Event Markers
ACC↑ / ACC↓ — Price acceptance above/below VWAP (A of B bars closed on one side)
REJ — Rejection at extreme (breakout + long wick)
RCLM — Value reclaim (price returns to value zone)
LOSS — Value loss (price breaks out of value zone)
📊 Key Components
VWAP — Dynamic fair value reference
Value Zone — VWAP ± k×ATR band (configurable)
Range/ATR Ratio — Volatility regime detection
EMA Slope — Trend direction proxy
💡 Trading Logic
COMPRESSION → Wait for breakout
EXPANSION → Follow the trend
REVERSION/REJ → Look for mean reversion trades
CHOP → Avoid or scalp range boundaries
⚙️ Settings
All parameters are fully customizable: ATR length, acceptance window, rejection thresholds, compression/expansion levels, and visual toggles.
Full Description:
This indicator combines Auction Market Theory with Volatility Regime Detection to classify the current market state and highlight key auction events.
🎯 Market States (Background Colors)
EXPANSION (lime) — Strong directional move, price outside value zone
CRAWL (green) — Trending move with price acceptance
REVERSION (orange) — Mean reversion back to value after deviation
COMPRESSION (blue) — Tight range, accumulation/distribution phase
CHOP (red) — Choppy, directionless price action
📍 Event Markers
ACC↑ / ACC↓ — Price acceptance above/below VWAP (A of B bars closed on one side)
REJ — Rejection at extreme (breakout + long wick)
RCLM — Value reclaim (price returns to value zone)
LOSS — Value loss (price breaks out of value zone)
📊 Key Components
VWAP — Dynamic fair value reference
Value Zone — VWAP ± k×ATR band (configurable)
Range/ATR Ratio — Volatility regime detection
EMA Slope — Trend direction proxy
💡 Trading Logic
COMPRESSION → Wait for breakout
EXPANSION → Follow the trend
REVERSION/REJ → Look for mean reversion trades
CHOP → Avoid or scalp range boundaries
⚙️ Settings
All parameters are fully customizable: ATR length, acceptance window, rejection thresholds, compression/expansion levels, and visual toggles.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.