Expert_AH_HM_MFI
This EA uses the MFI (Money Flow Index) smoothed by a Moving Average as a momentum-based signal filter within the MQL5 Standard Library Expert framework. It opens and closes trades based on threshold values applied to the CH_HM_MFI signal, with fixed lot money management and no trailing stop.
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 | -3.04% | -2.65% | 8.80% | 1 | 0.00% | — | — | — | — | Too few trades |
| GBPUSD | +3.58% | +3.10% | 6.51% | 1 | 0.00% | — | — | — | — | Too few trades |
| USDJPY | +2.50% | +2.17% | 6.66% | 1 | 0.00% | — | — | — | — | Too few trades |
| XAUUSD | +82.30% | +64.23% | 50.61% | 74 | 53.40% | 1.18 | 1.63 | 6 | +$116.24 | Reliable |
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 Momentum EAs with a reliable result on the same market: XAUUSD: better than 88% of 75
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| XAUUSD | 54% | +45.72% 2026-08 | -14.03% 2026-02 |
From the backtest equity curve, sampled about every two days; only reliable results.
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 strategy concept is based on momentum judgment using the Money Flow Index (MFI), smoothed by a Moving Average to generate trading signals. Entry conditions trigger when the CH_HM_MFI filter's signal strength exceeds the opening threshold (default 40), and positions close when signal strength falls below the closing threshold (default 20). Position sizing uses a fixed lot approach (default 0.1 lots) without dynamic adjustment based on account balance. Money management employs the MoneyFixedLot module with a percentage setting of 10% and a fixed lot size of 0.1. Both Stop Loss and Take Profit are set to 0, meaning no fixed stop-loss or take-profit is used, relying entirely on signal reversal for exit. Pending order expiration is set to 4 bars, and no trailing stop is configured, with risk control primarily depending on signal threshold filtering.
Strengths
- MFI combined with MA smoothing reduces false signals and improves signal quality
- Built on the MQL5 Standard Library Expert framework with well-structured, modular code architecture
- Adjustable signal thresholds provide flexible entry/exit control adaptable to different market conditions
Weaknesses
- Stop Loss and Take Profit are both set to 0, relying entirely on signal reversal for exits, which can cause significant losses in extreme market conditions
- Fixed lot sizing does not dynamically adjust based on account size or volatility, making money management overly simplistic
- No trailing stop configured, unable to lock in floating profits during trending markets
Possible improvements
- Add Stop Loss and Take Profit parameters; recommend at least ATR-based dynamic stop-loss to control per-trade risk
- Replace TrailingNone with a trailing stop module to protect profits during trending markets
Risk assessment
Overall risk: High risk
- Stop Loss and Take Profit are both 0, providing no protection during sudden events or extreme volatility, potentially leading to large losses
- Fixed lot sizing does not account for account equity changes, meaning risk exposure does not automatically decrease during consecutive losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Signal_ThresholdOpen | 40 | Entry signal threshold [0...100] |
Signal_ThresholdClose | 20 | Exit signal threshold [0...100] |
Signal_PriceLevel | 0.0 | Trade execution price level |
Signal_StopLevel | 0.0 | Stop loss level (in points) |
Signal_TakeLevel | 0.0 | Take profit level (in points) |
Signal_Expiration | 4 | Pending order expiration (in bars) |
Signal__PeriodMFI | 47 | MFI indicator period |
Signal__PeriodMA | 5 | MA period overlaid on RSI |
Signal__Weight | 1.0 | Signal filter weight [0...1.0] |
Money_FixLot_Percent | 10.0 | Money management percentage |
Money_FixLot_Lots | 0.1 | Fixed trading lot size |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.