Exp_2pbIdealMA_ReOpen
This EA trades based on the 2pbIdealMA indicator, entering positions when price crosses the ideal moving average line. It features a ReOpen mechanism that adds to winning positions on pullbacks to the MA, aiming to pyramid into strong trends while using the MA as dynamic support/resistance.
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 | -1.76% | -1.53% | 4.98% | 96 | 49.50% | -0.42 | -0.35 | 7 | −$1.49 | Reliable |
| GBPUSD | +4.94% | +4.28% | 4.97% | 97 | 50.50% | 0.94 | 0.99 | 7 | +$5.10 | Reliable |
| USDJPY | +0.56% | +0.49% | 5.35% | 94 | 47.90% | 0.16 | 0.10 | 5 | +$0.60 | Reliable |
| XAUUSD | +39.81% | +31.90% | 60.32% | 90 | 53.90% | 0.82 | 0.66 | 7 | +$47.51 | Reliable |
Profitable on 3 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 Trend Following EAs with a reliable result on the same market: EURUSD: better than 36% of 95 · GBPUSD: better than 83% of 95 · USDJPY: better than 59% of 95 · XAUUSD: better than 76% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 46% | +2.04% 2026-04 | -1.66% 2026-08 |
| GBPUSD | 62% | +3.00% 2026-07 | -2.51% 2026-10 |
| USDJPY | 46% | +2.83% 2026-04 | -1.93% 2026-03 |
| XAUUSD | 69% | +40.97% 2026-01 | -27.22% 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 uses the 2pbIdealMA indicator to determine trend direction, establishing initial positions when price crosses the moving average line. The ReOpen mechanism is the EA's distinctive feature, adding to positions when price pulls back to the MA line while existing trades are in profit, implementing a pyramiding approach during trends. Entry conditions involve price-MA crossover relationships and trend direction confirmation. Exit relies on opposite-side MA crossover or stop-loss/take-profit settings, with the MA itself serving as a dynamic stop reference. Position sizing uses fixed lots or balance-proportional methods, with independent risk logic for re-entries. Money management requires attention to total position concentration after multiple add-ons, as trend reversals can cause significant drawdowns.
Strengths
- The ReOpen mechanism maximizes profit in trending markets by adding on pullbacks rather than chasing
- MA-based trend following is logically clear and easy to understand with highly adjustable parameters
- Maximum re-open count limit prevents unlimited position accumulation and over-concentration risk
Weaknesses
- Multiple pyramided positions can cause compounding losses during trend reversals with significant drawdowns
- Default StopLoss of 0 is risky, as unlimited losses can occur without stop-loss protection
- Lacks volatility filtering, potentially generating frequent false signals and consecutive losses in ranging markets
Possible improvements
- Add a volatility filter (e.g., ATR) to reduce trading frequency during low-volatility ranging conditions
- Implement ATR-based dynamic stop-loss and trailing stop instead of fixed pip values
- Add maximum total position risk limit to ensure cumulative risk from multiple re-opens stays controlled
Risk assessment
Overall risk: Caution
- Default StopLoss of 0 can cause major losses during trend reversals
- High position concentration after multiple re-opens can lead to large drawdowns on single trend reversal
- No range market filter, potentially generating repeated losing entries during sideways consolidation
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Lots | 0.1 | Fixed trading lot size |
StopLoss | 0 | Stop loss in points, 0 means no stop loss |
TakeProfit | 0 | Take profit points (10 points) |
MA_Period | 50 | 2pbIdealMA MA period |
ReOpen | true | Enable pullback re-entry feature |
MaxReOpens | 3 | Maximum position additions |
TrailingStop | 0 | Trailing stop points |
MagicNumber | 12345 | EA magic number for identifying orders |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.