DeMarker Pending 2
This EA uses the DeMarker oscillator to identify overbought and oversold market conditions, placing pending orders when the indicator reaches extreme levels. It enters buy pending orders when DeMarker signals oversold and sell pending orders when overbought, targeting mean reversion price action. The strategy automates order placement and management based on DeMarker threshold crossings.
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.95% | -2.57% | 8.79% | 1 | 0.00% | — | — | — | — | Too few trades |
| GBPUSD | +3.88% | +3.36% | 6.49% | 1 | 0.00% | — | — | — | — | Too few trades |
| USDJPY | +2.85% | +2.47% | 6.62% | 1 | 0.00% | — | — | — | — | Too few trades |
| XAUUSD | -0.96% | -0.79% | 64.25% | 1 | 0.00% | — | — | — | — | Too few trades |
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: No blow-up pattern found
- Has no stop loss or trailing stop
On its own this is not a typical blow-up pattern, 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 concept is mean reversion trading based on the DeMarker oscillator, exploiting the tendency of prices to revert to the mean after the indicator reaches extreme overbought or oversold zones. Entry conditions trigger buy pending orders when DeMarker drops below the oversold threshold and sell pending orders when it rises above the overbought threshold, using pending orders rather than market orders for potentially better entry prices. Exit conditions rely on take-profit and stop-loss levels, closing positions when price reaches the predefined target or hits the protective stop. Position sizing typically uses fixed lot sizes or an account-balance-based calculation, with lot size parameters exposed to the user. Money management controls risk-reward ratios through TP/SL settings, though dynamic position sizing and adaptive risk management appear limited in this approach.
Strengths
- Pending order entries can achieve better entry prices compared to market orders
- DeMarker is a well-established oscillator that generates reliable mean reversion signals in ranging markets
- Clean and simple strategy logic with adjustable parameters, easy to optimize for different instruments
Weaknesses
- Mean reversion strategy suffers frequent counter-trend losses during strong trending markets
- Lacks a trend filter to distinguish ranging from trending conditions, increasing risk in directional moves
- Fixed DeMarker threshold levels may become ineffective under varying market volatility without adaptive mechanisms
Possible improvements
- Add a trend filter (e.g., moving average direction or ADX) to pause or reduce pending orders during trending markets
- Implement dynamic DeMarker thresholds that automatically adjust overbought/oversold levels based on market volatility
Risk assessment
Overall risk: Medium
- Mean reversion counter-trend trading during strong trends can cause consecutive stop-loss hits
- Pending orders may fill with slippage during volatile moves, resulting in worse-than-expected entry prices
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
DeMarker_Period | 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 |
LotSize | 0.1 | Lot size per order |
StopLoss | 500 | Stop loss in points |
TakeProfit | 1000 | Take profit in points |
PendingDistance | 50 | Pending order distance from current price in points |
MagicNumber | 39425 | Unique EA magic number identifier |
MaxOrders | 5 | Maximum simultaneous open orders |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.