Back to Free Indicators
Complete Documentation

Market State Intelligence

Diagnostic market-context indicator that classifies behavioral regimes through three core forces: Drive, Opposition, and Stability.

Section 01

Overview

Market State Intelligence (MSI) is a diagnostic market-context indicator designed to reveal how the market is behaving — not where price "should" go. Rather than generating buy/sell signals, MSI classifies the market into clear behavioral regimes.

What MSI Answers

  • What state is the market currently in?
  • Is energy building, releasing, or decaying?
  • Is participation aligned or opposing price?

The Three Forces

MSI continuously evaluates three core forces (0-100 each):

  • Drive — Directional effort engine. How much directional energy exists?
  • Opposition — Absorption & resistance engine. How much effort is being absorbed?
  • Stability — Structural persistence engine. How consistent is the current state?

Five Regimes

  • COMPRESSION (Slate) — Low drive, low opposition, high stability. Pressure building.
  • EXPANSION (Teal) — High drive, low opposition. Directional energy release.
  • TREND (Green) — Medium-high drive, sustained stability. Aligned continuation.
  • DISTRIBUTION (Amber) — Medium drive, high opposition. Effort without progress.
  • TRANSITION (Purple) — Rapid opposition rise, low stability. Regime shift underway.

Visual System

  • Regime Ribbon — Thin band at chart bottom showing current regime color
  • HUD Panel — Regime name and execution gate status (LONG OK / SHORT OK)
  • Time-to-Decision Meter (TDM) — Pressure gauge that fills during compression, drains during expansion
  • Structural Memory — Faint background stains where regimes previously failed
  • Effort vs Result Halo — Candle highlight when effort is being absorbed

Core Principles

  • Diagnostic > Signal (no buy/sell recommendations)
  • Continuous states > Binary events
  • Non-repainting (closed-bar data only)
Section 02

Calculation Methodology

MSI calculates three independent forces, then synthesizes them into regime classification.

Force 1: DRIVE (0-100)

Measures directional effort — how efficiently is price moving?

Components:

// Net Progress Ratio (45% weight)
Displacement = |Close - Close[lookback]|
StepSum = Σ|Close - Close[1]| over lookback
NetProgressRatio = Displacement / StepSum

// Range Expansion Quality (30% weight)
RangeSpan = Highest(High) - Lowest(Low)
ExpectedRange = ATR × √(lookback)
RangeExpansion = RangeSpan / (ExpectedRange × 1.5)

// Body Dominance (25% weight)
BodySize = |Close - Open|
CandleRange = High - Low
BodyDominance = BodySize / CandleRange

Drive = (NetProgress × 0.45) + (RangeExpansion × 0.30) +
        (BodyDominance × 0.25)

Force 2: OPPOSITION (0-100)

Measures absorption & resistance — how much effort is being rejected?

Components:

// Wick Pressure (35% weight)
TotalWick = UpperWick + LowerWick
WickPressure = TotalWick / CandleRange

// Effort-Result Gap (40% weight)
EffortRatio = Volume / SMA(Volume, 20)
PriceProgress = |Close - Close[1]| / ATR
EffortResultGap = max(0, EffortRatio - PriceProgress) / 2

// Reversal Density (25% weight)
ReversalCount = Count of direction changes over lookback
ReversalDensity = ReversalCount / (lookback × 0.5)

Opposition = (WickPressure × 0.35) + (EffortResultGap × 0.40) +
             (ReversalDensity × 0.25)

Force 3: STABILITY (0-100)

Measures structural persistence — how consistent is current state?

Components:

// Persistence Score (30% weight)
DriveStable = |Drive - Drive[1]| < 5 ? 1 : 0
OppStable = |Opposition - Opposition[1]| < 5 ? 1 : 0
PersistenceScore = (DriveStable + OppStable) / 2

// Variance Score (35% weight)
FlipCount = Count of Drive/Opp crossing 50 over lookback
VarianceScore = 1 - (FlipCount / lookback)

// Reaction Consistency (35% weight)
FollowThrough = Count of same-direction closes
ReactionConsistency = FollowThrough / lookback

Stability = (Persistence × 0.30) + (Variance × 0.35) +
            (Consistency × 0.35)

Regime Classification

if Opposition rising fast AND Stability low:
    Regime = TRANSITION
else if Drive high AND Opposition low:
    Regime = EXPANSION
else if Drive medium+ AND Opposition low-med AND Stability high:
    Regime = TREND
else if Drive medium AND Opposition high:
    Regime = DISTRIBUTION
else if Drive low AND Opposition low:
    Regime = COMPRESSION
Section 03

Input Settings

Preset Mode

  • Scalper — Fast response, quick decay. Sensitivity: 1.3, Smoothing: 0.7, Decay: 1.5
  • Swing (default) — Balanced. Sensitivity: 1.0, Smoothing: 1.0, Decay: 1.0
  • Position — Slow, stable regimes. Sensitivity: 0.7, Smoothing: 1.4, Decay: 0.6

Core Toggles

  • Analysis Mode (default: ON) — Subtle, muted visuals. OFF = full intensity.
  • Regime Ribbon (default: ON) — Thin horizontal band showing current regime.
  • Structural Memory (default: OFF) — Faint stains where regimes previously failed.
  • HUD Panel (default: ON) — Panel showing regime name and gate status.
  • Time-to-Decision Meter (default: OFF) — Pressure gauge bar.
  • Effort vs Result Halo (default: OFF) — Candle highlight when effort absorbed.

Visual Options

  • Show Regime Changes (default: ON) — Markers when regime transitions (e.g., COMP → EXP).
  • Show Regime Legend (default: OFF) — Diagnostic details with Drive/Opp/Stability values.
  • Panel Position — Top/Middle/Bottom + Left/Center/Right.

Advanced Tuning

  • Sensitivity (0.5-2.0, default: 1.0) — Higher = more responsive regime detection.
  • Smoothing (0.5-2.0, default: 1.0) — Higher = more stable, slower transitions.
  • Memory Decay (0.5-2.0, default: 1.0) — Higher = faster structural memory fade.
  • Visual Intensity — Low / Medium / High opacity.

Data Window

  • Show Data Window Values (default: OFF) — Export MSI Contract v1 values for analysis.
Section 04

Interpretation Guide

Regime Interpretations

COMPRESSION (Slate)

  • Drive low, Opposition low, Stability high
  • Energy is building — pressure accumulating
  • TDM gauge filling up
  • Implication: Prepare for breakout. Don't expect continuation of quiet.

EXPANSION (Teal)

  • Drive high, Opposition low
  • Directional energy releasing — clean moves
  • TDM draining rapidly
  • Implication: Momentum trades favored. Trail stops, ride the move.

TREND (Green)

  • Medium-high Drive, sustained Stability
  • Aligned continuation — healthy trending
  • Implication: Follow the trend. Pullbacks are opportunities, not reversals.

DISTRIBUTION (Amber)

  • Medium Drive, high Opposition
  • Effort without progress — absorption occurring
  • Halo may appear on candles
  • Implication: Be cautious. Effort is being absorbed, potential reversal brewing.

TRANSITION (Purple)

  • Opposition rising rapidly, Stability low
  • Regime shift underway — uncertainty elevated
  • Implication: Reduce exposure. Wait for new regime to establish.

Execution Gates

  • LONG • OK — Expansion or Trend regime, Drive > Opposition, Stability > 35, bias up
  • SHORT • OK — Expansion or Trend regime, Drive > Opposition, Stability > 35, bias down
  • Blocked — Distribution, Compression, or Transition regime (or conditions not met)

Force Relationships

  • Drive > Opposition — Directional energy winning, moves more likely to continue
  • Opposition > Drive — Absorption winning, moves more likely to fail
  • Stability high — Current state likely to persist
  • Stability low — Change is imminent
Section 05

Trading Applications

Strategy 1: Regime-Based Strategy Selection

Match your trading approach to the current regime.

  • COMPRESSION — Prepare for breakout, set alerts, tighten ranges
  • EXPANSION — Momentum trades, trail stops aggressively
  • TREND — Trend-following, buy pullbacks in direction
  • DISTRIBUTION — Take profits, avoid new entries, watch for reversal
  • TRANSITION — Reduce/close positions, wait for clarity

Strategy 2: Gate-Based Filtering

Only take trades when gates are open.

  • LONG • OK — Clear to take long signals from other systems
  • SHORT • OK — Clear to take short signals from other systems
  • Both blocked — Skip all signals, regardless of how good they look

Strategy 3: TDM Pressure Trading

Use Time-to-Decision Meter for timing.

  • TDM filling (70%+) — Compression extreme, breakout imminent
  • TDM draining rapidly — Expansion in progress, ride the move
  • TDM near zero after expansion — Move exhausted, take profits

Strategy 4: Structural Memory Awareness

Learn from where regimes failed before.

  • Memory stains — Price zones where expansion/trend failed previously
  • Approaching stain — Extra caution, may fail again
  • Breaking through stain — Significant if price clears the failure zone

Strategy 5: Force Divergence Detection

Watch for forces diverging from price.

  • Price rising, Opposition rising — Rally being absorbed, caution
  • Price rising, Drive falling — Momentum fading, potential top
  • Stability collapsing — Regime change incoming regardless of price

What NOT to Do

  • Don't trade against blocked gates
  • Don't hold through Transition regime
  • Don't expect Distribution to resolve in your favor
  • Don't ignore Compression building — it will release
Section 06

Data Window Values

MSI Export Contract v1

When "Show Data Window Values" is enabled, MSI exports the following values:

Regime Information

  • msi_regime_id — Current regime (0=Compression, 1=Expansion, 2=Trend, 3=Distribution, 4=Transition)
  • msi_regime_conf — Regime confidence (0-100)

Three Forces

  • msi_drive — Drive force (0-100)
  • msi_opp — Opposition force (0-100)
  • msi_stability — Stability force (0-100)

Derived Metrics

  • msi_tdm — Time-to-Decision Meter (0-100)
  • msi_gate_long — Long gate status (1=OK, 0=Blocked)
  • msi_gate_short — Short gate status (1=OK, 0=Blocked)
  • msi_memory — Structural memory score (0-100)
  • msi_effort_gap — Effort vs Result gap (0-100)
  • msi_bias — Directional bias (1=Up, -1=Down, 0=Neutral)

Status Line

  • Drive (0-100)
  • Opposition (0-100)
  • Stability (0-100)
  • Regime (0-4)
  • TDM (0-100)

Using Export Values

  • Pro integration — Use values in custom scripts or ATLAS PRO
  • Spreadsheet analysis — Export for regime performance tracking
  • Alert conditions — Build alerts based on specific thresholds
Section 07

Common Mistakes

Mistake 1: Treating MSI as Signal Generator

Problem: Looking for buy/sell signals from MSI.

Solution: MSI is diagnostic, not prescriptive. Use it to understand context, then apply signals from other tools appropriately.

Mistake 2: Ignoring Blocked Gates

Problem: Taking trades when gates show blocked status.

Solution: Respect the gates. When LONG/SHORT shows "—", the regime doesn't support directional trades.

Mistake 3: Fighting Distribution

Problem: Adding to positions during Distribution regime.

Solution: Distribution means effort is being absorbed. Take profits, don't add. The market is telling you something.

Mistake 4: Expecting Compression to Continue

Problem: Assuming low volatility will persist indefinitely.

Solution: Watch TDM. When it fills past 70%, breakout is imminent. Compression always resolves.

Mistake 5: Not Using Presets Correctly

Problem: Using Scalper preset for swing trading (or vice versa).

Solution: Match preset to your trading style. Scalper = fast, Position = slow. Mismatch causes whipsaw or late signals.

Mistake 6: Overcomplicating with All Visuals

Problem: Enabling all visual features at once.

Solution: Start with Ribbon + HUD only. Add TDM, Memory, and Halo as you learn what each provides.

Section 08

Pro Tips

Tip 1: Drive vs Opposition is the Core Signal

When Drive > Opposition, directional moves succeed. When Opposition > Drive, they fail. This single relationship predicts more than any other metric.

Tip 2: TDM Predicts Breakout Timing

The Time-to-Decision Meter is your breakout countdown. When it exceeds 80% during Compression, start preparing entry orders in both directions.

Tip 3: Stability Predicts Regime Duration

High Stability means the current regime will persist. Low Stability means change is coming — regardless of what Drive and Opposition say.

Tip 4: Regime Transitions Are Tradeable

The shift from COMPRESSION → EXPANSION often produces the cleanest moves. Watch for TDM drain combined with Drive spike.

Tip 5: Use Memory Stains as Caution Zones

When price approaches areas where previous regimes failed (memory stains), reduce position size or tighten stops. These zones have history of absorbing moves.

Tip 6: Effort Halo is an Early Warning

When the Halo appears on candles, effort is being absorbed even if price is still moving. This often precedes Distribution regime by several bars.

Tip 7: Combine with MAZ for Complete Picture

MSI tells you WHAT regime you're in. MAZ tells you WHERE price is accepted. Together: trade acceptance zones in the direction permitted by MSI gates.

Tip 8: Journal by Regime

Track your trading performance separately for each regime. Most traders discover they perform well in 1-2 regimes and poorly in others. Specialize in your best regimes.

Ready to use this indicator?

Add it to your TradingView charts for free. No signup required. Start analyzing markets smarter today.

Open on TradingView