Level 11 · Lesson 4
The 3-Regime Engine
TREND · RANGE · VOLATILE
Three states. One dominant winner at every bar. And a forecaster on top that tells you when the state is about to change.
First — Why This Matters
The single most misread signal on your chart is the Regime row.
Most operators see TREND in the Command Center and assume it's static — that the market is currently trending, end of story. That's a dangerous misread. Regime is computed every single bar by a three-score race: ADX drives a trend score, ATR spike drives a volatile score, and whatever is left becomes the range score. The tallest score wins. A chart that's TREND on one bar can become RANGE on the next.
But CIPHER doesn't just report the current regime. It runs a separate engine — the Regime Transition Predictor (RTP) — on top, tracking how long every past regime lasted and what typically followed. When the current regime starts aging past its historical average, RTP raises the probability of shift and shows you what's most likely to come next.
This is the lesson where regime stops meaning “what is the market right now” and starts meaning “what will the market become, and when.” The shift is the operator advantage.
⭐ THE REGIME FORECASTER PROMISE
By the end of this lesson, you will never glance at the Regime row and read only the color again. You will read the duration, you will read the probability, and you will know what comes next. That is the operator read.
01 — ⭐ The Regime as Forecaster, Not Observer
The Groundbreaking Concept
Every other indicator tells you the current regime. CIPHER also tells you how long it's lasted vs average, the probability of shift, and which regime is most likely to come next — learned from your chart's actual history.
Watch the animation cycle through four scenes. Scene 1: the naive dashboard view — just the current regime, no context. Scene 2: CIPHER adds duration (23 bars) and compares it to the historical average on this chart (35 bars). Probability: 24% — ride it. Scene 3: duration reaches 42 bars, well past average. The sigmoid probability curve lifts to 72% and the action column flips to → RANGE FORMING. Scene 4: the transition fires. Regime flips to RANGE, duration resets, a new sigmoid begins — and CIPHER already knows, from this chart's history, that TREND is the most likely state to come next.
⭐ THE OPERATOR'S PROMISE
The regime row is a forecaster, not a status label. Read the duration, then the probability, then the next-likely state. Reading only the color is leaving 70% of the signal unused.
02 — The Three Regimes
TREND · RANGE · VOLATILE
CIPHER classifies every bar into one of three regimes. Each regime has its own underlying market physics, its own color in the Command Center, and its own recommended playbook. There is no fourth state — no CHOPPY, no TRANSITION, no MIXED. Ties are broken in the order TREND > VOLATILE > RANGE, so every bar has exactly one verdict.
TREND is the ADX-driven regime. When the market moves directionally with strength, ADX climbs above 25 and the trend score dominates. RANGE is the residual regime — what's left after TREND and VOLATILE claim their share. It's the default state of a market that isn't trending and isn't spiking. VOLATILE is the ATR-spike regime. When current ATR exceeds 1.5× the 50-bar ATR average, the volatile score lifts above the others and the market is flagged as dislocating from its own normal range.
WHY THREE AND NOT FIVE OR SEVEN
More regimes = more false transitions. Three is the minimum that covers directional / undirectional / dislocating. Anything finer (STRONG TREND / WEAK TREND / TIGHT RANGE / WIDE RANGE) introduces more flicker than information. The three-regime cut is deliberate.
03 — The Three-Score Math
Tallest bar wins
At every bar CIPHER computes three numbers in parallel: trend_pct, volatile_pct, and range_pct. They sum to a bounded space; whichever is largest becomes the regime. No thresholds, no lockouts, no N-bar confirmation — pure winner-takes-all on this bar's values.
Watch three scenarios cycle. In each, three bars race upward to their true values, and the tallest wins the regime. Scenario 1: trend_pct dominates → TREND. Scenario 2: volatile_pct spikes → VOLATILE. Scenario 3: both others are small → range_pct wins by residual → RANGE.
trend_pct · ADX-driven
trend_pct = min(100, adx_val × 2.5)
ADX 40+ saturates to 100. ADX 20 gives 50. ADX 10 gives 25. Pure monotonic map — stronger trend, higher score.
volatile_pct · ATR spike detection
vol_spike = atr / atr_slow
volatile_pct = vol_spike > 2.0 ? 100 : vol_spike > 1.5 ? (vol_spike − 1.0) × 100 : 0
Below 1.5× = zero (nothing unusual). Above 2.0× = 100 (extreme spike). In between = ramps linearly.
range_pct · the residual
range_pct = max(0, 100 − trend_pct − volatile_pct)
Whatever's left over. If trend_pct is low AND volatile_pct is zero, range_pct wins by default — and that's how CIPHER tells you the market is simply undirectional.
TIE-BREAK PRIORITY
If trend_pct == volatile_pct, TREND wins. If volatile_pct == range_pct (and both exceed trend_pct), VOLATILE wins. RANGE only wins when it's strictly the largest. TREND > VOLATILE > RANGE.
04 — TREND · The ADX-Driven State
How ADX maps to trend_pct
The trend score is a direct monotonic function of ADX — the Average Directional Index computed with a 14-period lookback. CIPHER multiplies ADX by 2.5 and caps at 100, meaning ADX 40 or higher always saturates the trend score.
Watch the needle swing across the ADX scale. Below 15 = magenta CHOP, little to no directional conviction. 15-25 = amber BUILDING, directional energy forming. Above 25 = teal TREND, strong enough that trend_pct alone is likely to dominate the three-score race.
WHY ADX AND NOT CLOSE SLOPE OR MOVING AVERAGES
ADX measures directional strength independent of direction. A market rising steadily and a market falling steadily both produce the same ADX reading. This is exactly what regime classification needs — we're asking “is the market trending?” not “which way?”. The directional arrows in the Command Center header (▲ BULL TREND vs ▼ BEAR TREND) are driven separately by pulse_dir, not by ADX.
THE 2.5 MULTIPLIER
ADX saturates at 40 giving trend_pct = 100. This deliberately gives strong trends a floor of winning against most volatile_pct readings, which cap at 100 only during extreme 2.0×+ ATR spikes. In practice, a strong trend and a moderate volatility spike will coexist — and trend wins.
05 — VOLATILE · The ATR Spike State
When the market dislocates from its own normal range
CIPHER uses a ratio, not an absolute value, to decide when volatility has gone abnormal. It compares current ATR (14-period) against the 50-bar SMA of ATR ("ATR_slow"). When current ATR exceeds 1.5× ATR_slow, volatile_pct starts ramping. Above 2.0×, volatile_pct saturates at 100.
Watch the ATR line breathe across the chart. Most of the time it stays near the dashed ATR_slow baseline — volatile_pct is zero, no regime claim here. When a spike lifts the line through the amber 1.5× threshold, volatile_pct starts contributing. Cross the magenta 2.0× line and it saturates — the regime is almost certainly VOLATILE unless trend is extraordinarily strong.
WHY A RATIO, NOT AN ABSOLUTE THRESHOLD
A 50-pip ATR is calm on EURUSD 1H but extreme on EURUSD 5m. Comparing current ATR to its OWN 50-bar average makes VOLATILE self-calibrating to the instrument and timeframe — no manual tuning needed.
THE LINEAR RAMP BETWEEN 1.5 AND 2.0
volatile_pct = (vol_spike − 1.0) × 100 when vol_spike ∈ (1.5, 2.0)
At 1.5×, volatile_pct = 50. At 2.0×, volatile_pct = 100 and locks there. This lets VOLATILE compete with TREND at moderate spikes and dominate at extreme ones.
WHEN TREND AND VOLATILE COEXIST
A strong trend with ADX 40 gives trend_pct = 100. A 1.7× ATR spike gives volatile_pct = 70. Trend wins. But a 2.1× spike gives volatile_pct = 100 and a tie forms — TREND wins the tie per the priority rule (section 07). VOLATILE only wins when the spike is genuinely exceptional AND the trend is weakening.
06 — RANGE · What's Left Over
The residual regime
Unlike TREND and VOLATILE, the RANGE score isn't computed from a market metric. It's the residual — what's left after TREND and VOLATILE have claimed their share. When the market is undirectional and not spiking, the trend and volatile scores stay small, and RANGE wins by default.
Three cups fill from top and compete for what's in the water budget. TREND fills based on ADX. VOLATILE fills based on ATR spike. RANGE takes whatever's left. Scenario 1: moderate trend + quiet market → RANGE still gets 30%. Scenario 2: volatility dominates → RANGE only gets 15%. Scenario 3: both other scores are tiny → RANGE wins by residual with 70%.
WHY RANGE IS DESIGNED AS THE RESIDUAL
A market that isn't trending and isn't spiking is, by definition, in a range. There's nothing meaningful to measure about “rangeness” directly — any metric you invent (BB width, price standard deviation, etc.) is just a proxy for “how much trend and volatility are absent.” The residual approach cuts through that: if the other two regimes can't claim the bar, it's RANGE. Simple, non-redundant, and honest about what RANGE actually means.
07 — The Tie-Break Priority
TREND > VOLATILE > RANGE
When two scores tie, CIPHER follows a fixed priority to resolve the ambiguity: TREND beats VOLATILE, VOLATILE beats RANGE. This matters more than it looks — ties happen frequently on real charts, especially during regime transitions.
Four scenarios cycle. Three show genuine ties; the fourth shows a clean RANGE win for contrast. Watch how the verdict flips based on priority, not just the numbers. Tie 1: trend_pct = volatile_pct = 45 → TREND wins. Tie 2: volatile_pct = range_pct = 40 → VOLATILE wins. Tie 3: trend_pct = range_pct = 40 → TREND wins again.
WHY TREND WINS TIES
CIPHER's design philosophy is that a trending market with a volatility spike is still a trending market — the operator plays the trend, just with wider stops. Flipping to VOLATILE during a strong trend would suppress trend signals and break the operator's playbook.
WHY VOLATILE WINS OVER RANGE
A spike-driven range is NOT the same as a quiet range. Reading VOLATILE tells the operator “reduce size, don't fade the spike.” Reading RANGE would tell the same operator “fade the extremes” — a catastrophic misread during a news bar.
PRACTICAL CONSEQUENCE
If you ever see regime = TREND on a chart that looks sideways and wild, check ADX — it's almost certainly above 25 with an ATR spike happening. The priority is telling you the trend is still in control. Respect it, or wait for the regime row to flip.
08 — The Regime Transition Predictor
The forecaster engine, in full
The RTP runs on top of regime classification and does three things every bar: (1) tracks how long the current regime has lasted, (2) compares that duration to the historical average of all previous regimes of that type on this chart, (3) runs a sigmoid curve on the ratio to produce a probability of shift.
The sigmoid curve is steep at the crossing point — meaning a regime that's 20% past its average has a meaningfully higher shift probability than one that's 10% past. The probability climbs toward 95% (capped) as the regime ages further, never quite reaching certainty because markets occasionally trend or range much longer than average.
THE SIGMOID FORMULA
ratio = duration / avg
prob = 100 / (1 + e^(−3.5 × (ratio − 1.0)))
At ratio = 0.5 (half of average) → prob ≈ 15%. At ratio = 1.0 (exactly at average) → prob ≈ 50%. At ratio = 1.5 (50% past average) → prob ≈ 85%. At ratio = 2.0+ → capped at 95%.
THE LEARNED AVERAGE
Each time a regime ends, CIPHER appends its duration to a per-type array (the last 30 durations are kept). The average is computed from that rolling history. This means RTP's predictions get more accurate the longer it watches a chart — it's learning the personality of that symbol+timeframe.
THE TRANSITION MATRIX
Alongside durations, CIPHER tracks transition counts: TREND→RANGE, TREND→VOLATILE, RANGE→TREND, RANGE→VOLATILE, VOLATILE→TREND, VOLATILE→RANGE. When probability rises, the guidance column uses this matrix to pick the most likely NEXT regime. That's what "→ SHIFTING TO RANGE" actually means.
WHY A SIGMOID AND NOT LINEAR
A linear probability would treat “10% past average” the same as “just past average.” The sigmoid respects the reality that markets rarely transition exactly at average and the urgency accelerates once the regime is meaningfully stretched. It matches how experienced traders actually anticipate regime changes.
09 — Reading the Regime Row
Three cells, three meanings
The Regime row in the Command Center has exactly three cells. Each carries one specific piece of information, and they're designed to be read left-to-right as a complete thought: label · current state · transition guidance.
Watch the row cycle through five real states captured from live CIPHER sessions. Note the header bar stays in sync — regime is the primary driver of the header's state label AND color. Even if you turn the Regime row toggle OFF, the header is still regime-colored.
CELL 1 · LABEL
Always reads "Regime". Fixed color, fixed text. This is just the anchor so your eye knows which row you're on.
CELL 2 · CURRENT STATE
One of: TREND, RANGE, VOLATILE. Color matches the state. This is the three-score winner on this bar.
CELL 3 · TRANSITION GUIDANCE
The RTP output in plain English. Possible values:
- • → TREND INTACT / → RANGE HOLDING / → STAY CAUTIOUS — regime is stable (probability of shift below 50%)
- • → X FORMING — probability of shift 50%–75% (likely but not imminent)
- • → SHIFTING TO X — probability of shift above 75% (imminent)
THE OPERATOR READ
Read cell 2 first (current state), then cell 3 (what's coming). If cell 3 says INTACT / HOLDING / CAUTIOUS, you're in stable regime — play the playbook. If cell 3 says FORMING, start positioning for the next state. If cell 3 says SHIFTING, close or reduce — the regime is about to flip under you.
10 — The Five Downstream Effects
One flip, five systems change
Regime isn't just a label. When it changes, five separate systems in CIPHER respond. Understanding this cascade is what separates reading the regime row from operating on it.
Watch the center bubble cycle through TREND / RANGE / VOLATILE. With each regime, the five satellite cards update in sequence. These aren't cosmetic — each represents a real behavior change in CIPHER.
EFFECT 1 · HEADER STATE
The always-on Command Center header shows regime: ▲ BULL TREND / ▼ BEAR TREND (in TREND regime, combined with pulse_dir), ↔ RANGING (in RANGE), ⚡ VOLATILE (in VOLATILE). Even with the Regime row toggled OFF, the header is still reporting regime.
EFFECT 2 · ACTION CELL
The header's right column shows what to DO next. Some action strings only fire in specific regimes: → RIDE IT only appears in TREND. → COILING only appears in RANGE. → REDUCE SIZE only appears in VOLATILE. Regime is a hard gate on which actions CIPHER can suggest.
EFFECT 3 · TRANSITION GUIDANCE
The Regime row's third cell. Drives the RTP's plain-English output (INTACT / FORMING / SHIFTING). The guidance text is regime-specific — → TREND INTACT never appears when the current regime is RANGE.
EFFECT 4 · RISK ENVELOPE BANDS WIDEN
When regime = VOLATILE, the band scale adds +0.10 (widens bands by 10%). This prevents false DANGER verdicts during big moves. Section 11 shows this visually.
EFFECT 5 · ALERT JSON PAYLOAD
Every webhook alert CIPHER fires includes "regime": "TREND" (or RANGE, or VOLATILE) in the JSON. If you pipe CIPHER alerts into a bot, your automation gets the market state for every trade — so you can filter or size trades by regime downstream.
11 — VOLATILE Widens the Envelope
+10% wider bands in VOLATILE regime
One of the clearest downstream effects: when regime flips to VOLATILE, the Risk Envelope bands widen by 10%. This is a deliberate design — big moves are normal in VOLATILE regime, not danger signals. Without the widening, every spike would trigger a false DANGER verdict in the Risk row.
The animation shows identical price action in both panels. Left: TREND regime, bands at baseline band_scale = 1.00. Right: VOLATILE regime, bands at band_scale = 1.10 — 10% wider top and bottom. Same candles, more tolerance.
THE CODE PATH
regime_scale = 0.85 + trend_pct × 0.004
vol_regime_bonus = regime == "VOLATILE" ? 0.10 : 0.0
band_scale = regime_scale + vol_regime_bonus
The base scale already widens with trend strength (stronger trend = wider bands to give the trend room). The +0.10 VOLATILE bonus stacks on top.
PRACTICAL IMPACT
Before the widening, a news bar would push price through CIPHER's outer band and trigger Risk = DANGER. With the widening, the bar stays within the band and Risk correctly reads CAUTION or NORMAL — matching what an operator would call it.
NO OTHER REGIME AFFECTS BAND WIDTH
TREND doesn't widen. RANGE doesn't narrow. Only VOLATILE adjusts band scale. This is intentional — VOLATILE is the regime where the Risk Envelope's normal thresholds are most likely to mislead.
12 — No Hysteresis, The Honest Tradeoff
Regime CAN flicker bar-to-bar — here's why that's fine
Most regime-classification systems use hysteresis — requiring N consecutive bars of a new state before declaring a change. CIPHER does NOT. Regime is computed per-bar with no lock, no cooldown, no N-bar buffer. When trend_pct and volatile_pct are near-equal, regime can flip bar-to-bar.
The animation shows why this tradeoff works. Top strip: raw regime state per bar — yes, there's flicker. Bottom strip: RTP guidance over the same period — stable and actionable. CIPHER solves the flicker problem not by locking the classification, but by giving you a probability-aware guidance layer on top.
WHY CIPHER SKIPS HYSTERESIS
Hysteresis introduces lag. A 5-bar confirmation rule means you learn about the regime change 5 bars late — often after the setup you would have traded is already gone. CIPHER's philosophy is to report truth in real time and let the RTP smooth the OPERATOR guidance, not the raw data.
THE OPERATOR'S RESPONSIBILITY
Don't trade off a single bar's regime reading. Read the guidance cell: INTACT / FORMING / SHIFTING. These are RTP-driven and stable over many bars. A single flicker from TREND to RANGE and back means nothing — the guidance stays “TREND INTACT” throughout.
WHEN FLICKER MATTERS
Flicker is most common at regime transitions — when the market is genuinely undecided. If you see frequent flipping AND the guidance is saying “FORMING” or “SHIFTING”, that's a real alert. If the guidance is still saying “INTACT”, the flicker is just noise — hold position.
13 — Three Regime Playbooks
One regime = one playbook
Three regimes, three distinct operator approaches. The playbooks aren't interchangeable — running your TREND playbook in a RANGE regime is how operators get chopped, and running the RANGE playbook during a VOLATILE spike is how they get wrecked.
Each playbook highlights in sequence. Study the AVOID line in each — those are the classic operator mistakes. TREND: don't fade the move, ride pullbacks. RANGE: don't chase breakouts, fade the edges. VOLATILE: don't fade the spike, reduce and wait.
TREND PLAYBOOK
Entry: pullbacks to the Pulse or Flow line. Stop: beyond visible structure, give the trend room (bands are already wider in strong trend due to regime_scale). Size: full size, high conviction. Avoid: fading the move — CIPHER's “RIDE IT” action cell is telling you the trend is still in control.
RANGE PLAYBOOK
Entry: upper/lower range boundaries (identified via Structure row S/R). Stop: just outside range — ranges break clean, wide stops add no value. Size: normal to reduced — ranges have lower conviction than trends. Avoid: chasing breakouts — CIPHER's “COILING” action cell says the range is holding.
VOLATILE PLAYBOOK
Entry: skip most setups — volatility spikes produce more false signals than real ones. Stop: if you must enter, stops must be much wider (band widening is a hint). Size: half normal or none at all. Avoid: fading the spike — CIPHER's “REDUCE SIZE” action cell says capital preservation comes first.
MIXING PLAYBOOKS IS THE COMMON KILLER
Most operator drawdowns happen because the regime flipped (say TREND → RANGE) and the operator kept running the TREND playbook. The Regime row exists to prevent this. When the row flips, the playbook flips. Full stop.
14 — Common Mistakes
Six ways the Regime row gets misread
These are the six most common regime-reading errors operators make in live trading. Each is listed with its consequence and the fix. For each, ask honestly: have I done this?
Mistake 1 — Reading only the current state cell, ignoring the guidance
The regime says TREND so you keep adding size. But the third cell already said → RANGE FORMING. THE FIX: read ALL THREE cells left-to-right every time. The guidance is where the forecast lives.
Mistake 2 — Assuming regime is persistent because it hasn't changed in a while
“It's been TREND for an hour, it'll stay TREND.” Wrong logic — the longer it's lasted, the HIGHER the probability it's about to flip (sigmoid curve, section 08). THE FIX: treat long-lasting regimes with MORE suspicion, not less. Check RTP probability.
Mistake 3 — Trading on single-bar flicker
Regime blips from TREND to RANGE for one bar, then back. Operator closes the trend trade in panic. THE FIX: ignore single-bar flips. Only act when the guidance cell confirms: INTACT means hold, FORMING means prepare, SHIFTING means act.
Mistake 4 — Ignoring VOLATILE because it's rare
VOLATILE rarely fires (ATR spike > 1.5×), but when it does, it's the most important regime read on the chart. Operators skim past it because “it barely ever shows up.” THE FIX: when VOLATILE fires, STOP. Reduce size or step away. It's rare for a reason — the tail-risk moment.
Mistake 5 — Running the TREND playbook in a RANGE regime
Buying dips and adding on strength — classic TREND moves. But the regime is RANGE. You're buying near the top of the range and selling near the bottom. THE FIX: one regime, one playbook. When the regime flips, the playbook flips. No exceptions.
Mistake 6 — Turning the Regime row OFF to “reduce clutter”
Regime is arguably the single most consequential signal in CIPHER — it gates five downstream systems. Hiding the row to save screen space is false economy. THE FIX: keep the Regime row ON. If you need to save space, turn off something less critical (Last Signal, FVG row).
15 — The Regime Cheat Sheet
Screenshot This. Pin It.
The Three Regimes
TREND (ADX-driven) · RANGE (residual) · VOLATILE (ATR spike > 1.5×).
The Three Scores
trend_pct = min(100, ADX × 2.5) · volatile_pct = ramps 0→100 between 1.5× and 2.0× ATR/ATR_slow · range_pct = max(0, 100 − trend_pct − volatile_pct).
Tie-Break Priority
TREND > VOLATILE > RANGE. A trending market with a volatility spike is still TREND; CIPHER respects that hierarchy.
RTP — The Forecaster
Tracks regime duration vs historical average. Sigmoid probability: at avg = 50%, at 1.5× avg = 85%, at 2× avg = capped 95%. The longer a regime lasts, the higher the probability it's about to flip.
The Regime Row — Three Cells
Label ("Regime") · Current state (TREND/RANGE/VOLATILE) · Guidance (INTACT / HOLDING / CAUTIOUS / FORMING / SHIFTING).
The Five Downstream Effects
Regime drives: (1) the header state + color, (2) which action cells can appear, (3) the guidance text, (4) Risk Envelope band widening (+10% in VOLATILE only), (5) alert JSON payload.
Three Playbooks
TREND: ride pullbacks, full size, don't fade. RANGE: fade extremes, normal size, don't chase. VOLATILE: reduce and wait, don't fade the spike.
Mistakes to Avoid
❌ Reading only the state, ignoring guidance · ❌ Assuming regime is persistent · ❌ Trading on single-bar flicker · ❌ Ignoring VOLATILE · ❌ Wrong playbook for regime · ❌ Turning the Regime row OFF.
16 — Scenario Game
Read the Regime Like an Operator
Five scenarios. Each puts you in a real-feeling regime-reading situation. Pick the right call — explanations appear after every answer, including for the wrong ones.
Round 1 of 5
Score: 0/5
You open EURUSD 1H and the Command Center Regime row reads: Regime | TREND | → RANGE FORMING. You've had a bull position open for 40 bars. ADX is 28. Nothing looks visibly different on the chart.
What is the RTP actually telling you here?
17 — Knowledge Check
Final Quiz — 8 Questions
Question 1 of 8
CIPHER classifies every bar into one of how many regimes, and what are the tie-break rules?
Question 2 of 8
What drives the trend_pct score in the three-score regime race?
Question 3 of 8
When does volatile_pct first become non-zero?
Question 4 of 8
The RTP probability of regime shift follows a sigmoid curve. At what ratio (duration / avg) does the sigmoid output approximately 50%?
Question 5 of 8
The Regime row in the Command Center has three cells. What does the third cell (guidance) display?
Question 6 of 8
How many downstream systems in CIPHER change when the regime flips?
Question 7 of 8
Does CIPHER use hysteresis (N-bar confirmation) when classifying regimes?
Question 8 of 8
In the VOLATILE playbook, what is the correct AVOID rule?