EA Architecture · Internal State Machine
Breakout, Reversal, and Recovery Modes in a Gold EA: What's the Difference?
Quick Answer
A gold EA's breakout mode is the primary profit engine — it enters trades in the breakout direction when price clears a defined range. Reversal mode is triggered by failed breakouts, counter-trading trapped participants. Recovery mode activates after consecutive losses and adjusts trade frequency — NOT lot size, making it fundamentally different from martingale. Multi-mode EAs like Goldie Razor V2.8.4 combine all three, with each mode having distinct activation conditions and risk characteristics.
0%
Breakout mode win rate (trending sessions)
0%
Reversal mode win rate (failed breakout signals)
0
Consecutive SL hits to trigger recovery mode
The Three Operational Modes: Complete Breakdown
Think of a multi-mode EA as a state machine — software that can exist in one of several distinct states, each with its own logic, entry criteria, and exit behaviour. At any given moment, the EA is either in breakout mode, reversal mode, or recovery mode. Understanding which mode is active and why is essential to understanding your EA's live behaviour.
BREAKOUT MODE
DEFAULTMonitors price for range expansion beyond defined levels. Enters in the breakout direction with a directional bias confirmed by the H4 200 EMA.
REVERSAL MODE
TRIGGEREDDetects failed breakouts — price breaks out past the range boundary, but then reverses back inside the range. Enters a counter-trade against the failed breakout direction.
RECOVERY MODE
ADAPTIVEManages a sequence of trades after a losing period using position sizing adjustment — NOT martingale. The lot size does not multiply. Instead, the EA slightly increases frequency within tighter parameters to recover lost equity faster.
Mode Configuration Profiler
Find Your Recommended Mode Setup
Do you want the EA to take counter-trades after failed breakouts?
Do you want position sizing adjustment after consecutive losing streaks?
Do you want to keep the EA in pure breakout-only mode for maximum simplicity?
What EA Operational Modes Actually Are
An Expert Advisor is, at its core, a software program running as a loop — every tick, every bar, the EA evaluates its current state and decides whether to enter a trade, manage an existing trade, or do nothing. A single-mode EA always applies the same evaluation logic regardless of market conditions. A multi-mode EA maintains an internal state variable that changes the evaluation logic based on what has happened recently.
This is the state machine concept: the EA is always in one of a finite number of states. The transition between states is triggered by specific market events (a breakout, a failed breakout, three consecutive losses). Each state has its own entry logic, SL/TP placement, and exit management. The EA doesn't randomly switch between approaches — the switches are governed by deterministic rules that you can inspect in the EA's parameter settings.
Understanding this architecture changes how you diagnose EA performance. If the EA is losing money, the first question is: which mode was it in when the losing trades were taken? Were the losses in breakout mode during a choppy session? Were they in recovery mode during an adverse market period? Mode-specific loss analysis is far more useful than simply looking at win rate across all trades.
Failed breakouts are particularly common during ranging market conditions, which is exactly when reversal mode provides the most value — and when breakout mode alone would struggle.
Breakout Mode Deep Dive: The Signal, the Filter, and the Exit
Breakout mode is not simply "buy when price goes up." The signal requires two layers of confirmation to reduce false entries. The first layer is structural: price must close beyond the M15 session range. The range is defined as the high and low of the first 1–2 hours of the trading session — the initial consolidation period before directional movement begins. A close beyond this range signals that the market has made a directional decision.
The second layer is trend confirmation: the H4 200 EMA must be pointing in the direction of the breakout. A bullish breakout requires an upward-sloping H4 EMA. A bearish breakout requires a downward-sloping H4 EMA. This filter prevents the EA from entering breakout trades against the prevailing medium-term trend — one of the most common sources of false breakout trades.
The exit management in breakout mode uses a 6-level trailing stop. This is not a simple trailing stop that follows price by a fixed number of pips. Instead, it has six discrete levels: as price moves through each profit milestone (e.g., +5 pips, +10 pips, +15 pips), the stop is moved to a progressively higher level. The effect is that early in a breakout trade, the EA gives the trade room to develop. Later, as the trade becomes profitable, the stop tightens aggressively to protect the gain.
The time-based exit ensures the EA never holds a stagnant position overnight unless conditions are explicitly favourable. This keeps position management clean and prevents the psychological "hope" trap — leaving a trade open because you don't want to realise the loss.
Reversal Mode: Trapped Traders and Counter-Momentum
Reversal mode exploits one of the most reliable patterns in short-term trading: the false breakout. When price breaks above a clear resistance level, retail traders who have been watching that level pile in long — they've been waiting for the confirmation. Market makers and institutional traders know this. They push price above the level briefly to trigger those orders, then let the market reverse as the demand dries up.
The resulting dynamic is that a breakout which fails creates a cluster of trapped long traders. Each of those traders has a stop loss below the breakout point. As price falls back through the breakout level, those stops begin triggering — adding selling pressure to the market. This cascade creates a self-reinforcing move in the reversal direction. Reversal mode enters in the direction of this cascade, riding the momentum generated by trapped traders exiting their positions.
Statistically, reversal signals have a lower win rate than breakout signals (approximately 43% vs 68% in trending conditions) but a higher average winner, because the trapped-trader cascade can produce fast, momentum-driven moves. The expectancy per trade is positive in both modes, but the character of the winners and losers is different.
Recovery mode is often mistaken for martingale — see our drawdown guide for why this distinction matters in terms of account survival under adverse conditions.
Recovery Mode vs Martingale: The Critical Distinction
This is the most important concept to understand about multi-mode EAs, because the confusion between recovery mode and martingale is responsible for many traders avoiding recovery-mode EAs entirely — or, worse, thinking their recovery-mode EA is safe when it is actually running a martingale variant under a different label.
True martingale: after each loss, the lot size multiplies. Loss 1 at 0.01 lot. Loss 2 at 0.02 lot. Loss 3 at 0.04 lot. Loss 4 at 0.08 lot. Loss 5 at 0.16 lot. Loss 6 at 0.32 lot. After 6 consecutive losses, the lot size is 32× the starting size. The 7th trade, if it also loses, generates a loss equal to the combined loss of all previous trades. On a standard account, this cascading exposure produces account wipeouts in a matter of days during adverse market conditions. No recovery mode and no safety parameter changes this math — it's embedded in the lot-multiplier logic.
Fixed-lot recovery mode: after each loss, the lot size stays the same or is adjusted by a small, fixed amount (e.g., 0.01 → 0.02, not 0.01 → 0.02 → 0.04 → 0.08). The EA may increase trade frequency slightly to recover losses faster, but the total exposure at any point is capped. The MaxRecoveryTrades parameter ensures the EA stops trying to recover after a defined number of attempts, accepting the loss rather than compounding it.
The scalping version of this multi-mode architecture is explained in our scalping bot mode guide, where recovery logic operates at much faster timescales — minutes rather than sessions.
Mode Activation Flow: Step-by-Step Transitions
EA starts in Breakout Mode at session open. Monitoring M15 range high and low.
Price closes beyond range + H4 EMA confirms direction. Breakout trade entered.
Scenario A: Trade hits TP or trailing stop exit. → Remain in Breakout Mode for next signal.
Scenario B: Trade hits SL. Price returns to opposite side of range. → Reversal Mode activates.
Reversal trade taken. If it wins → return to Breakout Mode. If it also loses → Loss #2 logged.
After 3rd consecutive SL within session. → Recovery Mode activates.
Recovery trades taken at same lot size, tighter entry criteria. Equity tracked against pre-loss level.
Equity restored OR MaxRecoveryTrades reached. → Recovery Mode deactivates. Return to Breakout Mode.
Multi-Mode EAs vs Single-Mode EAs
Single-mode EAs are easier to understand, easier to debug, and easier to configure. If something goes wrong, there is only one set of logic to examine. The downside is that they are rigid — a pure breakout EA in a choppy, non-trending market will struggle because the market is not providing the conditions the strategy requires. The EA cannot adapt; it can only wait for conditions to return or be manually disabled.
Multi-mode EAs adapt but introduce complexity. Regime changes can disable effective breakout mode — see our guide on why EAs fail after profitable periods for analysis of how this happens. When an EA seems to "stop working," the root cause is often that the market regime has shifted and the EA's mode logic is no longer aligned with current conditions.
The practical answer for most traders: start with a single-mode EA (or a multi-mode EA with all non-breakout modes disabled), build experience and pattern recognition over 3–6 months of live trading, then gradually enable additional modes with careful performance tracking. Each new mode enabled should produce a measurable change in performance metrics — if it doesn't, the mode may not be suited to your trading session or market conditions.
For the definitive guide on how each mode's parameters are configured in MT5, including the specific parameter names and recommended values for different risk profiles, see our EA risk management and parameters guide.
When to Disable Specific Modes
Disable Reversal Mode
- ·During high-impact news weeks (FOMC, NFP)
- ·When gold is in a strong sustained trend
- ·During London/NY overlap — too much noise
- ·Holiday periods with thin liquidity
Disable Recovery Mode
- ·Near any major data release
- ·When account margin buffer < 30%
- ·During your first 30 days of live trading
- ·Holiday periods (thin market, wide spreads)
Reduce Breakout Sensitivity
- ·Flat H4 EMA (no clear trend)
- ·Pre-CPI / pre-FOMC consolidation
- ·Very narrow ATR days (< 80 pips range)
- ·Post-news consolidation phase
Frequently Asked Questions
Related Reading
Pro-Scalper EA Range
Find the Right EA for Your Trading Style
Goldie Sniper EA PRO
Session breakout · M1 · London & NY
High-frequency session breakout capturing London open and NY session momentum on the M1 timeframe.
Goldie Razor V2.8.4
Range breakout · M15 · H4 EMA filter
M15 range breakout with H4 200 EMA trend filter, 6-level trailing stop, and failed-breakout recovery.
Goldie Razor V2
H1 range breakout · proven track record
The original Goldie Razor — H1 breakout strategy with a long live track record on XAUUSD.
Blind Sniper X PRO
Triple-confirmation · low frequency
Low-frequency sniper requiring triple signal confirmation — fewer trades, higher per-trade selectivity.
Hybrid Manual Scalper Pro
Manual entry · automated exits
You control entries; the EA manages exits, trailing stops, and position management automatically.
Get All 5 EAs
Full Pro-Scalper suite
All five Expert Advisors at a bundle price — cover every market condition and trading style.
Goldie Razor V2.8.4
M15 breakout + H4 EMA filter — all three modes built in for XAUUSD on MT5