Expert_AH_HM_Stoch
This EA uses a custom Stochastic oscillator signal filter (CH_HM_Stoch) combined with a moving average to generate buy/sell signals within the MQL5 Expert Advisor framework. It employs fixed lot sizing for money management and no trailing stop. Trade entries and exits are governed by configurable signal threshold values for opening and closing positions.
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 | -4.26% | -3.71% | 7.87% | 76 | 42.70% | -0.80 | -0.54 | 4 | −$6.13 | Reliable |
| GBPUSD | -8.68% | -7.59% | 10.62% | 71 | 31.40% | -1.24 | -0.82 | 8 | −$12.74 | Reliable |
| USDJPY | +4.22% | +3.65% | 5.10% | 27 | 55.60% | 0.62 | 0.83 | 3 | +$15.62 | Reliable |
| XAUUSD | +96.26% | +74.56% | 37.97% | 52 | 49.00% | 1.42 | 2.54 | 4 | +$194.62 | Reliable |
Profitable on 2 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 Mean Reversion EAs with a reliable result on the same market: EURUSD: better than 23% of 30 · GBPUSD: better than 6% of 32 · USDJPY: better than 81% of 32 · XAUUSD: better than 84% of 31
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 46% | +1.31% 2025-11 | -2.09% 2026-04 |
| GBPUSD | 38% | +2.24% 2026-01 | -3.75% 2026-09 |
| USDJPY | 54% | +2.30% 2026-03 | -1.38% 2026-07 |
| XAUUSD | 54% | +56.63% 2026-01 | -15.34% 2026-05 |
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 core strategy of this EA is based on the custom CH_HM_Stoch signal filter, which integrates the Stochastic oscillator with a Moving Average (MA) indicator. Entry conditions are triggered when the Stochastic indicator value crosses or deviates from the MA beyond the configured opening threshold (Signal_ThresholdOpen=40). Exit conditions occur when the signal strength falls below the closing threshold (Signal_ThresholdClose=20). Position sizing uses a fixed lot approach (Money_FixLot_Lots=0.1) without dynamic adjustment based on account balance. Money management employs the CMoneyFixedLot class, trading with a fixed percentage (Money_FixLot_Percent=10%) and fixed lot size. The strategy falls under the mean reversion category, leveraging the overbought/oversold characteristics of the Stochastic combined with MA trend assessment to identify price reversion opportunities. Notably, no explicit Stop Loss or Take Profit levels are set (Signal_StopLevel=0, Signal_TakeLevel=0), relying entirely on the signal filter's closing logic for risk control.
Strengths
- Built on the standard MQL5 Expert framework with clean, well-structured code that is easy to maintain and extend
- The Stochastic combined with MA signal filtering mechanism can effectively filter out false signals and improve entry quality
- Signal threshold-based entry/exit control provides flexible strategy tuning space
- Pending orders have expiration time (Signal_Expiration=4 bars), preventing long-term margin occupation
Weaknesses
- No Stop Loss (Signal_StopLevel=0) or Take Profit (Signal_TakeLevel=0) set, lacking hard risk protection when signals fail
- Fixed lot sizing cannot dynamically adjust position size based on market volatility and account risk
- The D-period is set to 49, far exceeding conventional values (typically 3-5), which may cause severe signal lag and missed optimal entry timing
- No trailing stop mechanism (TrailingNone), profitable positions cannot lock in floating profits
- Relies on a single signal filter without multi-dimensional confirmation, potentially generating frequent false signals in choppy markets
Possible improvements
- Add non-zero default values for Stop Loss and Take Profit parameters to provide a baseline risk protection floor
- Replace fixed lot sizing with dynamic position management (e.g., ATR-based or risk-percentage mode) for market-volatility-adaptive adjustment
- Introduce a trailing stop mechanism to replace TrailingNone, enabling profit locking in trending markets while letting profits run
Risk assessment
Overall risk: High risk
- Stop Loss and Take Profit are both 0, which could cause massive losses in extreme market conditions with no hard exit protection
- Fixed lot mode does not adjust with account size, potentially leading to over-leveraging in small accounts
- Stochastic D-period of 49 is excessively long; signal lag may cause severe losses during rapid market reversals
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__StochPeriodK | 15 | Stochastic K period |
Signal__StochPeriodD | 49 | Stochastic D-line period |
Signal__StochPeriodSlow | 25 | Stochastic slow smoothing period |
Signal__StochApplied | STO_LOWHIGH | Stochastic price application method |
Signal__MAPeriod | 15 | Additional moving average period |
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 Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.