OPEN-SOURCE SCRIPT
AOC Market Regime Classifier

How it works
The indicator combines three core components:
EMA Structure (21 / 55) → measures directional bias
ATR (volatility normalization) → evaluates movement relative to market activity
Range Analysis (highest/lowest window) → detects compression and breakout conditions
Using these inputs, the script calculates:
Trend strength → distance between EMAs normalized by ATR
Range tightness → price compression relative to volatility
Breakout conditions → price escaping recent highs/lows
Regime Classification
The market is dynamically classified into four states:
TREND → Strong directional movement with sustained structure
RANGE → Low volatility, compressed price action
BREAKOUT → Price expansion beyond recent range
TRANSITION → Mixed or unclear conditions between regimes
Each regime is color-coded directly on the chart for quick visual interpretation.
What makes it useful
Helps filter trades based on market context
Prevents using the wrong strategy in the wrong environment
Highlights compression → expansion cycles
Keeps analysis simple and adaptive
How to use
Focus on trend-following strategies during TREND phases
Use mean-reversion approaches in RANGE conditions
Watch BREAKOUT for potential expansion opportunities
Be cautious during TRANSITION phases (lower conviction environment)
Key idea
Markets change behavior your strategy should too.
This tool helps you stay aligned with current conditions instead of applying a one-size-fits-all approach.
The indicator combines three core components:
EMA Structure (21 / 55) → measures directional bias
ATR (volatility normalization) → evaluates movement relative to market activity
Range Analysis (highest/lowest window) → detects compression and breakout conditions
Using these inputs, the script calculates:
Trend strength → distance between EMAs normalized by ATR
Range tightness → price compression relative to volatility
Breakout conditions → price escaping recent highs/lows
Regime Classification
The market is dynamically classified into four states:
TREND → Strong directional movement with sustained structure
RANGE → Low volatility, compressed price action
BREAKOUT → Price expansion beyond recent range
TRANSITION → Mixed or unclear conditions between regimes
Each regime is color-coded directly on the chart for quick visual interpretation.
What makes it useful
Helps filter trades based on market context
Prevents using the wrong strategy in the wrong environment
Highlights compression → expansion cycles
Keeps analysis simple and adaptive
How to use
Focus on trend-following strategies during TREND phases
Use mean-reversion approaches in RANGE conditions
Watch BREAKOUT for potential expansion opportunities
Be cautious during TRANSITION phases (lower conviction environment)
Key idea
Markets change behavior your strategy should too.
This tool helps you stay aligned with current conditions instead of applying a one-size-fits-all approach.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.