MartGreg_1
This EA uses a dual MACD crossover strategy to generate buy and sell signals, combined with a Martingale position-sizing system that doubles the lot size after consecutive losses. It enters trades only when no position is already open, with fixed stop-loss and take-profit levels. The OnTester function evaluates profitability relative to maximum drawdown.
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 strategy concept is based on dual MACD crossover signals for trend determination, using two MACD indicators with different parameters for confluence-confirmed entries. Entry conditions for long: MACD1 histogram turns up from below (t[0]>t[1] and t[1]<t[2]) and MACD2 histogram is rising (k[1]>k[0]); short conditions are the inverse. Exit conditions rely on fixed stop-loss and take-profit at Stop=500 points and Tp=1500 points respectively. Position sizing employs a Martingale system implemented via the Martingail class, doubling lot size after each loss with the doubling count controlled by the Ud parameter and base lot determined by DML=1000. Money management persists the Martingale state via global variables across EA restarts, but there is no maximum drawdown limit or account equity protection mechanism.
Strengths
- Dual MACD confluence confirmation improves signal reliability and reduces false signals
- Take-profit exceeds stop-loss (Tp=1500 vs Stop=500), yielding a 3:1 reward-to-risk ratio with positive expectancy potential
- OnTester function accounts for max consecutive losses and profit/loss ratio, providing a reasonable strategy evaluation framework
Weaknesses
- Martingale position sizing exponentially amplifies risk during consecutive losses, potentially causing account blowup
- Only allows single-direction position (PositionSelect check), cannot trade both directions simultaneously, missing counter-trend opportunities
- Lacks new bar check; tick_volume>1 filter is unreliable and may cause duplicate entries
Possible improvements
- Add maximum Martingale multiplier limit and account equity protection to prevent account blowup from consecutive losses
- Add new bar detection logic replacing tick_volume filter to avoid duplicate entries within the same bar
Risk assessment
Overall risk: Dangerous
- Martingale strategy exponentially increases position size after consecutive losses, potentially depleting account rapidly in extreme markets
- No maximum drawdown limit or account balance protection mechanism
- Only checks positions for the symbol but not pending orders, may open duplicate trades when pending orders exist
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
DML | 1000 | Martingale base lot amount |
Ud | 1 | Number of doubles after loss |
Stop | 500 | Stop loss in points |
Tp | 1500 | Take profit in points |
Slipage | 50 | Allowed slippage |
MACD1Fast | 5 | MACD1 fast EMA period |
MACD1Slow | 20 | MACD1 slow EMA period |
MACD2Fast | 10 | MACD2 fast EMA period |
MACD2Slow | 15 | MACD2 slow EMA period |
Similar Martingale EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.