DeMarker Pending 2_5
This EA uses the DeMarker oscillator to identify overbought and oversold market conditions, then places pending orders at calculated price levels expecting a mean reversion. It employs a pending order strategy with configurable DeMarker thresholds and order placement distances. The EA automates trade entry when DeMarker signals extreme conditions, targeting price reversals back toward the mean.
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 | +6.40% | +5.54% | 2.64% | 124 | 51.20% | 1.42 | 2.42 | 6 | +$4.93 | Reliable |
| GBPUSD | +5.88% | +5.09% | 3.56% | 124 | 49.20% | 1.05 | 1.65 | 7 | +$4.74 | Reliable |
| USDJPY | +1.59% | +1.38% | 4.59% | 123 | 49.60% | 0.41 | 0.35 | 8 | +$1.29 | Reliable |
| XAUUSD | +15.53% | +12.67% | 43.38% | 133 | 52.30% | 0.57 | 0.36 | 7 | +$13.64 | Reliable |
Profitable on 4 of 4 markets with reliable results.
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.
Against the other Mean Reversion EAs with a reliable result on the same market: EURUSD: better than 97% of 30 · GBPUSD: better than 88% of 32 · USDJPY: better than 56% of 32 · XAUUSD: better than 48% of 31
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 62% | +2.03% 2026-07 | -0.95% 2026-10 |
| GBPUSD | 46% | +5.05% 2026-03 | -1.69% 2026-05 |
| USDJPY | 54% | +1.99% 2026-07 | -2.69% 2025-11 |
| XAUUSD | 38% | +67.25% 2026-03 | -13.95% 2026-07 |
From the backtest equity curve, sampled about every two days; only reliable results.
Blow-up risk: No blow-up pattern found
None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.
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 of this EA is based on a mean reversion logic using the DeMarker oscillator, placing sell pending orders when DeMarker enters the overbought zone (typically above 0.7) and buy pending orders when it enters the oversold zone (typically below 0.3). Entry conditions rely on DeMarker threshold parameter settings, with pending order placement triggered when the indicator crosses extreme levels. Exit conditions are controlled through take profit and stop loss parameters, holding positions while waiting for price to revert from extreme levels. Position sizing uses a fixed lot approach without dynamic position adjustment mechanisms. Money management lacks compounding or risk-proportional calculation, relying solely on static lot size settings. The pending order distance parameter determines the offset between the entry price and the current market price, providing some buffer for price volatility.
Strengths
- Uses the DeMarker oscillator for mean reversion signals, with clear logic based on a well-established technical indicator
- Employs pending orders for entry, avoiding market execution slippage risks while providing a price buffer
- Configurable overbought/oversold thresholds allow traders to flexibly adjust strategy parameters for different market conditions
Weaknesses
- Fixed lot sizing lacks dynamic position management, unable to adapt risk exposure based on account equity and volatility
- Mean reversion strategy will continuously trade against the trend in strong trending markets, potentially causing consecutive stop losses
- Lacks new bar detection mechanism, potentially placing duplicate orders on the same signal leading to overtrading
Possible improvements
- Add dynamic position sizing that automatically adjusts lot size based on account balance percentage or ATR volatility
- Add a trend filter (e.g., moving average) to prevent counter-trend entries when the strong trend direction opposes the signal
- Implement new bar detection and pending order status checks to avoid duplicate order placement and order management confusion
Risk assessment
Overall risk: Medium
- Mean reversion strategy faces continuous counter-trend loss risk in strong one-sided trending markets
- Fixed lot size does not account for account equity changes, potentially creating excessive risk on small accounts
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
DeMarker_Period | 14 | DeMarker indicator calculation period |
DeMarker_Overbought | 0.7 | Overbought threshold; place sell pending above this |
DeMarker_Oversold | 0.3 | Oversold threshold; place buy pending below this |
Pending_Distance | 50 | Pending order offset from current price in points |
TakeProfit | 100 | Take profit in points |
StopLoss | 50 | Stop loss in points |
LotSize | 0.1 | Lot size per order |
MagicNumber | 39591 | Unique EA magic number identifier |
Order_Expiration | 0 | Pending order expiration time (0=no expiration) |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.