MultiMartin
A multi-currency martingale EA that opens an initial BUY or SELL order and, upon a loss, reverses direction with a multiplied lot size. It uses virtual stop-loss/take-profit with optional trailing stops and supports per-symbol configuration via a compact string syntax for running multiple instruments simultaneously.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
Why this EA never traded: no entry rule survived the conversion.
Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.
Blow-up risk: Elevated
- Increases the position size after losses (martingale)
High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →
Strategy analysis
The core strategy is a martingale reversal system: it opens an initial order in the StartType direction, and upon a losing close, reverses direction with the lot size multiplied by the Factor. On a profitable close, it resets to the initial lot size and continues in the same direction. Entry conditions are: when no position exists, open the first order per StartType; after a profitable close, re-open in the same direction with initial lots; after a losing close, open in the opposite direction with Factor-multiplied lots. Exit conditions use virtual stop-loss and take-profit: market close when price hits open price ± SL/TP points in price terms, with optional trailing stop support (breakeven or straight trailing modes). Position sizing multiplies lots by Factor on each loss, rounded to the lot step, but capped by the Limit parameter (max multiplications) and the broker's maximum lot size. Money management includes a checkFreeMargin function that verifies available margin before opening, falling back to initial lots if insufficient, and skipping the trade entirely if margin is still inadequate while triggering the SkipBadTime pause mechanism. The EA also supports time filtering (HourStart to HourEnd) and a bad-time skipping mechanism to avoid repeatedly hitting margin errors.
Strengths
- Supports multi-currency simultaneous operation with flexible per-symbol configuration via compact string syntax
- Includes margin check mechanism that falls back to initial lots when insufficient, helping prevent account blow-up
- SkipBadTime mechanism pauses trading after order failures, preventing resource waste from repeated errors
- Virtual stop-loss/take-profit implementation is flexible with trailing stop support
- Clean code structure using object-oriented design (Settings/ExpMartin/ExpMartinPool classes)
Weaknesses
- Martingale strategy carries extreme inherent risk: lot sizes grow exponentially on consecutive losses, potentially hitting max lots or blowing the account in just a few losing streaks
- Virtual stop-loss/take-profit depends on EA running continuously; if the EA disconnects or restarts, SL/TP protection is lost with no server-side safeguard
- Order selection logic in init() has a flaw: it breaks after finding the first BUY or SELL ticket, potentially missing other orders in the same direction
- No real stop-loss orders are placed on the server, so extreme market gaps can result in losses far exceeding the intended stop-loss
- The Limit parameter controls pre-calculated max lot size rather than actual number of martingale steps, so consecutive losses may exceed expected capital tolerance
Possible improvements
- Place real stop-loss orders on the server instead of virtual SL/TP, ensuring protection even when the EA is disconnected
- Add maximum drawdown percentage limit and maximum consecutive loss count limit as hard capital protection guards
- Fix the order scanning logic in init() to collect all relevant orders rather than breaking after finding the first one
- Add new bar detection mechanism to avoid repeated trade execution within the same tick
- Add spread filter to avoid opening positions during high-spread periods
Risk assessment
Overall risk: Dangerous
- Martingale strategy: exponential lot growth on consecutive losses can lead to account blow-up
- Virtual SL/TP: no protection when EA disconnects or restarts
- No server-side stop-loss: extreme market gaps can cause losses far exceeding expectations
- No maximum drawdown protection: no account-level capital safeguard mechanism
- No spread filter: high-spread periods may cause unnecessary losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
_UseTime | true | Enable trading time filter |
_HourStart | 2 | Trading start hour(0-23) |
_HourEnd | 22 | Trading end hour(0-23) |
_Lots | 0.01 | Initial lot size |
_Factor | 2.0 | Lot multiplier after loss |
_Limit | 5 | Maximum multiplier application count limit |
_StopLoss | 500 | Stop loss in points |
_TakeProfit | 500 | Take profit in points |
_StartType | 0 | First order direction: 0-Buy, 1-Sell |
_Magic | 1000 | Order magic number |
_SkipBadTime | bt_SECOND | Time interval to skip trading after order failure |
_WorkSymbols | Multi-symbol config string (format: symbol±lots*multiplier^count(SL,TP)[start,end];...) | |
_Trail | tt_NONE | Trailing stop type: None/Break-even/Straight |
Similar Martingale EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.