Exp_3rdGenerationXMA
This EA trades based on signals from the 3rd Generation XMA (Extended Moving Average) indicator, entering long when the smoothed value rises and short when it falls. It uses configurable smoothing methods (SMA, EMA, JJMA, etc.) and applies multi-timeframe analysis with a default H4 timeframe. Position sizing supports either fixed lot or percentage-based allocation, with stop loss and take profit for risk control.
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: 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 strategy concept is based on the 3rd Generation XMA indicator's smoothed trend identification, applying double smoothing to price data to reduce noise and determine trend direction. Entry conditions: a long position opens when Value[1]<Value[2] (indicator rising from 2 bars ago to 1 bar ago) and Value[0]>Value[1] (current value continues rising); a short position opens when Value[1]>Value[2] and Value[0]<Value[1]. Exit conditions are triggered by reverse signals for position closing, with fixed stop loss (1000 points) and take profit (2000 points). Position sizing is controlled via the MM parameter, where negative values represent fixed lot size and positive values represent a percentage of the deposit. Money management relies on wrapped functions in TradeAlgorithms.mqh for trade execution, with independent buy/sell permission controls, but lacks dynamic position adjustment mechanisms such as scaling, partial close, or trailing stop.
Strengths
- Uses 3rd generation XMA double smoothing algorithm to effectively reduce market noise and improve signal quality
- Supports 10 smoothing methods and 11 price types, providing strong strategy flexibility
- Multi-timeframe analysis allows trading after trend confirmation on higher timeframes, reducing false signals
- Independent buy/sell permission controls enable strategy combination or directional-only trading
- New bar detection mechanism prevents repeated position opening within the same bar
Weaknesses
- Lacks trailing stop mechanism, which may lead to premature take profit or overly distant stop loss in trending markets
- Fixed 1000-point stop loss and 2000-point take profit are not dynamically adjusted based on market volatility (e.g., ATR)
- Only closes positions on reverse signals without additional trend exhaustion or acceleration criteria, potentially causing frequent open/close in ranging markets
- No check for existing same-direction positions, which may lead to duplicate position opening
- Negative MM value for fixed lot size is confusing by design, and lacks minimum/maximum lot size limits
Possible improvements
- Add ATR-based dynamic stop loss and take profit calculation instead of fixed points to adapt to different market volatility environments
- Add trailing stop functionality to lock in floating profits during trending markets
- Add same-direction position check to avoid duplicate entries; add ranging market filter (e.g., ADX) to reduce false signals
- Improve MM parameter design by using an enumeration to clearly distinguish between fixed lot and percentage modes, and add lot size upper/lower limit protection
Risk assessment
Overall risk: Medium
- Fixed stop loss/take profit not adapted to market volatility - stop too large in low volatility, too small in high volatility
- No check for existing same-direction positions may cause duplicate entries leading to excessive position sizing
- SignalBar=1 uses completed bar signals which is relatively safe, but SignalBar=0 uses incomplete bar signals with repainting risk
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | -0.1 | Trade deposit percentage; negative value = fixed lot size |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Max price deviation in points (slippage tolerance) |
BuyPosOpen | true | Allow opening buy positions |
SellPosOpen | true | Allow opening sell positions |
BuyPosClose | true | Allow closing buy positions |
SellPosClose | true | Allow closing sell positions |
InpInd_Timeframe | PERIOD_H4 | Indicator timeframe |
XMA_Method | MODE_EMA | Smoothing method selection |
XLength | 50 | Smoothing depth/period |
XPhase | 15 | Smoothing parameter (-100~+100 for JJMA, CMO period for VIDIA, slow MA period for AMA) |
IPC | PRICE_TYPICAL | Price type constant |
Shift | 0 | Indicator horizontal shift in bars |
PriceShift | 0 | Indicator vertical shift in points |
SignalBar | 1 | Bar index for entry signal |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.