EA-314 · Mean Reversion

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

RiskHigh risk
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsStochastic, MA
AuthorMetaQuotes Software Corp.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-4.26%-3.71%7.87%7642.70%-0.80-0.544−$6.13Reliable
GBPUSD-8.68%-7.59%10.62%7131.40%-1.24-0.828−$12.74Reliable
USDJPY+4.22%+3.65%5.10%2755.60%0.620.833+$15.62Reliable
XAUUSD+96.26%+74.56%37.97%5249.00%1.422.544+$194.62Reliable

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

MarketMonths with a gainBest monthWorst month
EURUSD46%+1.31% 2025-11-2.09% 2026-04
GBPUSD38%+2.24% 2026-01-3.75% 2026-09
USDJPY54%+2.30% 2026-03-1.38% 2026-07
XAUUSD54%+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

Code quality4.0
Strategy logic2.0
Risk management1.0
Robustness2.0
Innovation2.0
Documentation1.0
Overall2.0

Parameters

ParameterDefaultDescription
Signal_ThresholdOpen40Entry signal threshold [0...100]
Signal_ThresholdClose20Exit signal threshold [0...100]
Signal_PriceLevel0.0Trade execution price level
Signal_StopLevel0.0Stop loss level (in points)
Signal_TakeLevel0.0Take profit level (in points)
Signal_Expiration4Pending order expiration (in bars)
Signal__StochPeriodK15Stochastic K period
Signal__StochPeriodD49Stochastic D-line period
Signal__StochPeriodSlow25Stochastic slow smoothing period
Signal__StochAppliedSTO_LOWHIGHStochastic price application method
Signal__MAPeriod15Additional moving average period
Signal__Weight1.0Signal filter weight [0...1.0]
Money_FixLot_Percent10.0Money management percentage
Money_FixLot_Lots0.1Fixed trading lot size

Similar Mean Reversion EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.