Individual MT5 indicator · Version 1.00

TF Regime Persistence Map

Classify causal price behaviour as TREND, RANGE, TRANSITION or SHOCK with explicit component diagnostics and hysteresis.

Four-phase market regime visualization
Calculation

Four independent behaviour inputs

Median efficiency ratio and normalized sign entropy over 20/50/100 bars combine with a 20-bar realized-volatility percentile against 252 older estimates and 5-versus-60 median true-range expansion. Shock activates immediately on a closed bar; every other state change needs two consecutive closed bars.

TREND Efficiency ≥ 0.35 and entropy ≤ 0.90
RANGE Efficiency ≤ 0.20 and entropy ≥ 0.95
SHOCK Volatility percentile ≥ 90 or expansion ≥ 1.8
TRANSITION All remaining observations
Buffers

Auditable DataWindow

Confirmed/raw state, efficiency, entropy, volatility percentile and expansion are exposed. Maximum history is 100,000 bars.

Evidence

Causal replay

Four synthetic regimes, flat/outlier cases and a one-bar-at-a-time non-repaint replay passed. MQL matched 1,000 golden rows exactly.

Actual MT5

Four-colour band QA

TF Regime Persistence Map on dark EURUSD H1 chart
TF Regime Persistence Map on light GBPUSD H4 chart
Install

Use in MT5

  1. Copy indicator and shared include files.
  2. Refresh Navigator and attach to a chart.
  3. Read bar 0 as preliminary; use closed bands for confirmed history.
  4. Enable the optional transition alert only if wanted.
Integrity

Auditable release

Build 6163: 0 errors, 0 warnings. 100,000-bar first read completed in 4,616 ms. ZIP SHA-256: 16096293d0c3a2825c722899ddce9f1f00ee70c11cb8c0240aeb1bc2bd768fb2.

Market-behaviour context only. No promise of profit or personal investment advice.