DeMarker Pending
This EA uses the DeMarker oscillator to identify overbought and oversold market conditions, then places pending orders at strategic price levels when extreme readings are detected. It enters buy positions when DeMarker signals oversold conditions and sell positions when overbought, aiming to capture mean reversion moves. The use of pending orders rather than market orders allows for better entry prices with built-in price confirmation.
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 | -2.77% | -2.42% | 5.51% | 128 | 54.70% | -0.61 | -0.50 | 4 | −$2.17 | Reliable |
| GBPUSD | -2.46% | -2.14% | 6.67% | 126 | 54.00% | -0.39 | -0.37 | 4 | −$1.95 | Reliable |
| USDJPY | -1.22% | -1.06% | 5.65% | 128 | 49.20% | -0.30 | -0.22 | 5 | −$0.96 | Reliable |
| XAUUSD | +214.46% | +157.69% | 27.20% | 143 | 51.00% | 2.19 | 7.88 | 7 | +$149.97 | Reliable |
Profitable on 1 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 43% of 30 · GBPUSD: better than 38% of 32 · USDJPY: better than 38% of 32 · XAUUSD: better than 100% of 31
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 46% | +0.52% 2026-02 | -1.39% 2026-08 |
| GBPUSD | 46% | +2.29% 2026-02 | -4.85% 2026-03 |
| USDJPY | 38% | +1.59% 2025-12 | -1.83% 2026-02 |
| XAUUSD | 62% | +88.89% 2026-01 | -10.27% 2026-03 |
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 mean reversion trading based on the DeMarker oscillator. The DeMarker indicator measures the speed and magnitude of price changes; when readings exceed the configured overbought threshold, it signals that the market is overextended to the upside and may reverse, and when readings fall below the oversold threshold, it signals oversold conditions with potential for a bounce. Entry conditions are: place a buy pending order when the DeMarker value drops below the oversold level, and place a sell pending order when it rises above the overbought level. Using pending orders instead of market orders allows the trade to be executed only after price confirms the anticipated direction by reaching the pending order price. Exit conditions rely on the stop loss and take profit parameters configured by the user, controlling risk-reward ratio through fixed pip-based SL/TP levels. Position sizing uses a fixed lot approach without dynamic scaling, and money management lacks equity-proportional calculation, making the overall risk control dependent on static stop loss parameters without trailing stop or dynamic take profit features.
Strengths
- Pending order entry provides additional price confirmation, avoiding false signals in choppy markets
- DeMarker is a proven oscillator that reliably identifies overbought/oversold conditions in ranging markets
- Strategy logic is clean and straightforward with highly configurable parameters for optimization across instruments
Weaknesses
- Mean reversion strategy suffers consecutive losses in trending markets due to lack of trend filtering
- Fixed lot sizing does not adapt to account equity, hindering long-term capital growth and risk control
- Absence of trailing stop and partial close features means floating profits cannot be locked in during winning trades
- No check for existing positions in the same direction, potentially leading to duplicate entries and increased risk exposure
Possible improvements
- Add a trend filter (e.g., MA direction or ADX threshold) to avoid counter-trend trading during strong directional moves
- Implement equity-proportional dynamic position sizing and add trailing stop functionality to protect profits
Risk assessment
Overall risk: Medium
- Mean reversion strategy can incur consecutive stop losses and significant drawdown during trending markets
- Fixed lot size without equity-based adjustment may over-leverage smaller accounts
- Lack of position checking may lead to duplicate entries in the same direction
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
DeMarkerPeriod | 14 | DeMarker indicator calculation period |
OverboughtLevel | 0.7 | Overbought threshold; place sell order above this |
OversoldLevel | 0.3 | Oversold threshold; place buy order below this |
StopLoss | 500 | Stop loss in points |
TakeProfit | 1000 | Take profit in points |
LotSize | 0.1 | Lot size per order |
PendingDistance | 50 | Pending order distance from current price in points |
MagicNumber | 123456 | Unique EA magic number identifier |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.