OPEN-SOURCE SCRIPT
Market Regime Lite

Market Regime Lite
A background-coloring indicator that tells you what kind of market you're in.
What It Does
Every bar, it reads ADX, ATR, volume, and price structure together and classifies the market into one of five states:
🟢 Trending — Strong momentum, expanding volatility, clean structure. Trade with the trend.
🔴 Exhaustion — Trend is overextended. Climactic volume, ADX rolling over.
🟠 Distribution — Trend is dying. Lower highs forming, participation fading.
🔵 Accumulation — Low volatility, low volume, subtle higher lows. Something is building.
⚫ Choppy — No edge, Flat everything.
How It Classifies
Each regime gets a score out of 5. Whichever scores highest (minimum 3) wins. If nothing clears the threshold, it defaults to Choppy.
Settings
ADX / ATR Length — 14 default, standard momentum and volatility lookback
ATR Percentile Lookback — 100 bars by default, ranks current volatility vs history
Volume MA Length — 20-bar baseline for volume comparison
Structure Lookback — Controls how significant a swing high/low needs to be
On the Chart
The background fills with the regime color. The top-right table shows the regime name, its score, and live ADX / ATR% / Volume readings.
A background-coloring indicator that tells you what kind of market you're in.
What It Does
Every bar, it reads ADX, ATR, volume, and price structure together and classifies the market into one of five states:
🟢 Trending — Strong momentum, expanding volatility, clean structure. Trade with the trend.
🔴 Exhaustion — Trend is overextended. Climactic volume, ADX rolling over.
🟠 Distribution — Trend is dying. Lower highs forming, participation fading.
🔵 Accumulation — Low volatility, low volume, subtle higher lows. Something is building.
⚫ Choppy — No edge, Flat everything.
How It Classifies
Each regime gets a score out of 5. Whichever scores highest (minimum 3) wins. If nothing clears the threshold, it defaults to Choppy.
Settings
ADX / ATR Length — 14 default, standard momentum and volatility lookback
ATR Percentile Lookback — 100 bars by default, ranks current volatility vs history
Volume MA Length — 20-bar baseline for volume comparison
Structure Lookback — Controls how significant a swing high/low needs to be
On the Chart
The background fills with the regime color. The top-right table shows the regime name, its score, and live ADX / ATR% / Volume readings.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.