Exp_AnchoredMomentum
This EA trades based on the Anchored Momentum custom indicator, opening buy positions when momentum crosses above the upper level and sell positions when it crosses below the lower level. It uses a custom indicator handle with configurable SMA/EMA periods and threshold levels for signal generation. Position sizing uses a deposit share mechanism with fixed Stop Loss and Take Profit in points.
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 | — | — | — | — | — | Run error |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Run error |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Run error |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Run error |
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 core strategy of this EA is based on breakthrough trading using the Anchored Momentum indicator. Entry conditions are: a buy signal is generated when the indicator value crosses above the upper level (UpLevel=+0.025) from below, and a sell signal is generated when the indicator value crosses below the lower level (DnLevel=-0.025) from above, using crossover confirmation rather than simple threshold comparison to avoid false signals. Exit conditions include: closing long positions when the indicator falls below the lower level while holding long, and closing short positions when the indicator rises above the upper level while holding short, with each trade also having fixed Stop Loss (1000 points) and Take Profit (2000 points). Position sizing is controlled by the MM parameter, where negative values represent fixed lot sizes and positive values represent deposit share-based lot calculation. Money management relies on the external TradeAlgorithms.mqh library functions BuyPositionOpen and SellPositionOpen for execution. The strategy uses a new bar detection mechanism (IsNewBar) to prevent repeated trades on the same bar, but also allows tick-by-tick execution when SignalBar=0. With a default H4 timeframe and momentum indicator, this is a medium-to-long-term momentum breakout strategy.
Strengths
- Uses crossover confirmation (Value[1]>UpLevel and Value[0]<=UpLevel) rather than simple threshold, reducing false signals
- Provides complete buy/sell open/close permission controls for flexible unidirectional or bidirectional trading
- New bar detection mechanism prevents repeated trades within the same bar, reducing overtrading risk
- Configurable Stop Loss and Take Profit parameters provide a basic risk control framework
- Indicator parameters and timeframe are all configurable, offering good strategy adaptability
Weaknesses
- Depends on external TradeAlgorithms.mqh library and custom AnchoredMomentum indicator; EA cannot run without these files
- Large fixed SL/TP values (1000/2000 points) with no dynamic adjustment mechanism may not suit current market volatility
- Lacks spread filter and volatility filter, which may generate numerous false signals in narrow ranging markets
- Indicator handle creation failure only prints a warning but OnInit still returns 0 (success) instead of INIT_FAILED
- No maximum position limit or drawdown control, leaving risk exposure uncontrolled during extreme market conditions
Possible improvements
- OnInit should return INIT_FAILED instead of 0 when indicator handle creation fails, preventing EA from running without the indicator
- Add spread filter and ATR volatility filter to avoid false signals during low liquidity or narrow ranging conditions
- Add maximum position count limit and maximum drawdown protection to improve risk control during extreme market conditions
Risk assessment
Overall risk: Medium
- EA continues running when indicator handle creation fails, potentially causing complete trading logic failure
- No spread filter means Stop Loss could be triggered instantly in high-spread environments
- Fixed SL/TP does not adapt to market volatility changes, potentially causing oversized losses in volatile conditions
- Tick-by-tick execution when SignalBar=0 may cause frequent open/close in high volatility
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | -0.1 | Money management ratio or fixed lot size |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum price slippage deviation |
BuyPosOpen | true | Allow buy position opening |
SellPosOpen | true | Allow sell position opening |
BuyPosClose | true | Allow closing long positions |
SellPosClose | true | Allow closing short positions |
InpInd_Timeframe | PERIOD_H4 | Timeframe for anchor momentum indicator |
MomPeriod | 8 | SMA period |
SmoothPeriod | 6 | EMA smoothing period |
IPC | PRICE_CLOSE | Applied price type for indicator calculation |
UpLevel | +0.025 | Upper breakout level |
DnLevel | -0.025 | Lower breakout level |
Shift | 0 | Indicator bar shift offset |
SignalBar | 1 | Bar index for entry signal |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.