OPEN-SOURCE SCRIPT
Regime Compass

Most traders take the same setup in a March 2020 crash as they would in a quiet summer drift, then wonder why results are all over the place.
Regimes change everything. A breakout that prints in low-vol trends gets chopped up in a crisis. I've learned the hard way that knowing where you stand before putting on risk matters as much as the entry signal itself.
This indicator classifies the current environment into four states: RISK-ON, NEUTRAL, RISK-OFF, CRISIS.
It blends three things:
Volatility (40% of the score). Reads VIX for equities or DVOL for crypto, falling back to a realized
vol percentile ranking when neither is on the chart. It also tracks whether vol is speeding up or
slowing down against its own longer-term average. A calm market getting choppy fast is a completely different animal to one that has been volatile for months and is starting to settle.
Trend (35%). Price against short, medium and long-term moving averages. Not calling direction, just asking whether the structure underneath is holding up or falling apart.
Momentum (25%). RSI and rate-of-change percentile over the trailing year. Captures whether we are at an extreme or not.
These blend into a single composite, lightly smoothed so the label does not flip every bar. On the chart you get a colour-coded oscillator, optional background shading so the regime state is visible at a glance, and a dashboard table breaking out each sub-score, fast realized vol, and the live VIX or DVOL read. Alerts fire on regime transitions.
It auto-detects crypto against equity and adjusts annualization accordingly. All thresholds and
lookbacks are in the settings.
I built this because regime awareness is the first filter I run on any trade. Options selling, systematic work, deciding when to lean in or step back. That question always comes first.
Regimes change everything. A breakout that prints in low-vol trends gets chopped up in a crisis. I've learned the hard way that knowing where you stand before putting on risk matters as much as the entry signal itself.
This indicator classifies the current environment into four states: RISK-ON, NEUTRAL, RISK-OFF, CRISIS.
It blends three things:
Volatility (40% of the score). Reads VIX for equities or DVOL for crypto, falling back to a realized
vol percentile ranking when neither is on the chart. It also tracks whether vol is speeding up or
slowing down against its own longer-term average. A calm market getting choppy fast is a completely different animal to one that has been volatile for months and is starting to settle.
Trend (35%). Price against short, medium and long-term moving averages. Not calling direction, just asking whether the structure underneath is holding up or falling apart.
Momentum (25%). RSI and rate-of-change percentile over the trailing year. Captures whether we are at an extreme or not.
These blend into a single composite, lightly smoothed so the label does not flip every bar. On the chart you get a colour-coded oscillator, optional background shading so the regime state is visible at a glance, and a dashboard table breaking out each sub-score, fast realized vol, and the live VIX or DVOL read. Alerts fire on regime transitions.
It auto-detects crypto against equity and adjusts annualization accordingly. All thresholds and
lookbacks are in the settings.
I built this because regime awareness is the first filter I run on any trade. Options selling, systematic work, deciding when to lean in or step back. That question always comes first.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Public, timestamped track record. Free month of the desk: ivanlabrie.netlify.app
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Public, timestamped track record. Free month of the desk: ivanlabrie.netlify.app
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.