Autotrader Momentum
This EA implements a simple momentum strategy by comparing the close price of a user-specified current bar against a user-specified comparable bar. When price rises over the lookback period it opens a buy; when price falls it opens a sell, always closing the opposite position first. It includes configurable stop loss, take profit, trailing stop with step, and margin checks before order placement.
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.97% | -0.84% | 3.72% | 109 | 49.10% | — | — | — | — | Same as other EAs |
| GBPUSD | +6.69% | +5.79% | 4.59% | 107 | 51.40% | — | — | — | — | Same as other EAs |
| USDJPY | +3.63% | +3.14% | 4.42% | 99 | 51.50% | — | — | — | — | Same as other EAs |
| XAUUSD | -3.39% | -2.81% | 49.78% | 104 | 51.50% | — | — | — | — | Same as other EAs |
On every market this backtest is identical to EA-17162, EA-17352, EA-22834. The automatic conversion almost certainly lost what makes this EA different (a custom indicator, a filter or the money management), so these results are not ranked or counted.
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 pure price momentum comparison: if the close price of a user-designated current bar is higher than the close price of a comparable bar N periods ago, the EA detects upward momentum and opens a buy; if lower, it detects downward momentum and opens a sell. Entry conditions are straightforward — close_array[InpCurrentBar] > close_array[InpComparableBar] triggers a long entry, and the reverse triggers a short entry, with trading logic executed only on new bar birth. Exit conditions include fixed stop loss and take profit (both defaulting to 50 pips), plus a trailing stop mechanism with configurable minimum distance (5 pips) and step (5 pips); opposite positions are closed before opening a new directional position. Position sizing uses a fixed lot mode (default 1.0 lot) with validation through CheckVolumeValue to ensure compliance with symbol minimum/maximum lot size and lot step requirements. Money management incorporates a FreeMarginCheck call before order placement to verify sufficient available margin, rejecting orders if margin is insufficient. The overall strategy is very simple and direct, lacking trend filters, volatility filters, multi-timeframe confirmation, or any advanced momentum indicators like RSI or MACD.
Strengths
- Clean code structure using MQL5 standard library (CTrade, CSymbolInfo, etc.) following proper development conventions with good code quality
- Includes margin check, lot size validation, and stop loss/take profit protection providing a basic risk management framework
- Trailing stop functionality helps lock in floating profits and prevents profit giveback
- Executes trading logic only on new bar birth, avoiding excessive tick-level trading
- Automatic adaptation for 3/5 digit brokers ensuring good compatibility
Weaknesses
- Strategy logic is overly simplistic, comparing only two bar close prices without filters, generating numerous false signals and frequent trades in ranging markets
- Fixed lot sizing lacks dynamic position management, unable to adjust risk exposure based on account size or market volatility
- Default stop loss and take profit of only 50 pips with 1:1 ratio provides poor risk-reward, and 5-pip trailing stop is too tight and easily triggered by market noise
- Lacks spread filter, volatility filter, and multi-timeframe confirmation, prone to losses in high-spread or low-liquidity environments
- Closes opposite positions and re-opens on every signal, incurring significant commission and slippage costs during frequent whipsaws
Possible improvements
- Add momentum confirmation indicators (such as RSI, MACD, or ADX) as filters to reduce false signals in ranging markets
- Implement dynamic position sizing (e.g., ATR-based risk percentage lot calculation) and adjust stop loss/take profit distances based on volatility
Risk assessment
Overall risk: Medium
- Simple momentum comparison generates frequent open/close signals in ranging markets leading to significant commission costs
- Default 5-pip trailing stop is too tight and easily triggered by normal market volatility causing premature exits
- Fixed 1.0 lot trading lacks dynamic adjustment based on account balance, potentially exposing small accounts to excessive risk
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
InpLots | 1.0 | Fixed trading lot size |
InpStopLoss | 50 | Stop loss distance in points |
InpTakeProfit | 50 | Take profit distance in points |
InpTrailingStop | 5 | Minimum trailing stop distance in points |
InpTrailingStep | 5 | Trailing stop step in points |
InpCurrentBar | 0 | Current bar index for comparison |
InpComparableBar | 15 | Comparable bar index (lookback period) |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.