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.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.