EA-327 · Mean Reversion

Expert_CP_Stoch

This EA uses a Stochastic oscillator combined with a moving average filter to generate trading signals within the MQL5 Standard Library Expert Advisor framework. It employs fixed-lot money management and no trailing stop, relying on fixed stop-loss and take-profit levels for trade exits. The signal threshold mechanism aggregates weighted filter signals before opening or closing positions.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskHigh
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsStochastic, MA
AuthorMetaQuotes Software Corp.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-6.92%-6.04%9.60%14243.30%-1.49-0.726−$5.15Reliable
GBPUSD-0.25%-0.22%6.54%14246.80%-0.02-0.045−$0.34Reliable
USDJPY+2.69%+2.34%4.74%14259.60%0.520.575+$1.80Reliable
XAUUSD-100.00%-100.00%100.00%5556.40%-1.71-1.004−$186.84Account stopped out

Profitable on 1 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 17% of 30 · GBPUSD: better than 53% of 32 · USDJPY: better than 62% of 32 · XAUUSD: better than 0% of 31

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD46%+1.11% 2026-08-2.30% 2026-09
GBPUSD54%+1.83% 2026-01-2.68% 2026-03
USDJPY69%+1.85% 2026-03-2.07% 2026-08
XAUUSD40%+26.24% 2026-01-100.00% 2026-03

From the backtest equity curve, sampled about every two days; only reliable results.

Blow-up risk: High

  • Hit a stop-out in our backtest (equity below 10%) on XAUUSD

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 uses a Stochastic oscillator as the primary signal generator, combined with a moving average (MA) as an auxiliary filter. Entry conditions rely on Stochastic %K/%D line crossovers in overbought/oversold zones, confirmed by the MA for trend direction, and the aggregated signal must reach the opening threshold (Signal_ThresholdOpen=10) before a position is opened. Exit conditions include the reverse signal reaching the closing threshold (Signal_ThresholdClose=10), stop-loss (50 points) or take-profit (50 points) being hit. Position sizing uses a fixed lot approach (Money_FixLot_Lots=0.1), which does not dynamically adjust based on account balance or volatility. Money management employs the CMoneyFixedLot class with a fixed percentage of 10% and a fixed lot size of 0.1, lacking the ability to dynamically size positions based on volatility or risk. The overall strategy is mean-reversion in nature, exploiting the Stochastic indicator's tendency to revert from overbought/oversold levels, but the relatively tight stop-loss and take-profit (50 points each) may result in frequent stop-outs in volatile markets.

Strengths

  • Uses the MQL5 Standard Library framework with clean, modular code structure
  • Stochastic oscillator combined with MA provides dual filtering to reduce false signals
  • Signal threshold mechanism offers flexible open/close control, preventing overtrading
  • Fixed lot sizing reduces position management complexity, suitable for beginners

Weaknesses

  • Fixed 50-point stop-loss and take-profit without ATR-based dynamic adjustment, leading to inconsistent performance across varying market conditions
  • Fixed lot sizing instead of dynamic position management cannot adapt to account size and risk
  • No trailing stop used (CTrailingNone), potentially missing profits from extended trends
  • Lacks new bar check mechanism despite EveryTick=false, risking duplicate operations on the same bar
  • No spread filter included, which may cause unnecessary losses on high-spread instruments

Possible improvements

  • Replace fixed stop-loss/take-profit with ATR-based dynamic calculation to adapt to varying market volatility
  • Add a trailing stop module to replace CTrailingNone, protecting profits and following trends
  • Add spread filter and new bar check mechanism to improve trade execution reliability

Risk assessment

Overall risk: Medium

  • Fixed 50-point stop-loss may be too wide in low-volatility markets and too tight in high-volatility markets, creating asymmetric risk
  • Lack of new bar check and spread filter creates risk of duplicate entries and slippage
  • Fixed lot sizing ignores account equity changes, maintaining constant risk exposure during losing streaks

Evaluation scores

Code quality4.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
Signal_ThresholdOpen10Entry signal threshold [0...100]
Signal_ThresholdClose10Exit signal threshold [0...100]
Signal_PriceLevel0.0Trade execution price level
Signal_StopLevel50.0Stop loss level (in points)
Signal_TakeLevel50.0Take profit level (in points)
Signal_Expiration4Pending order expiration (in bars)
Signal__StochPeriodK33Stochastic %K period
Signal__StochPeriodD37Stochastic D-line period
Signal__StochPeriodSlow30Stochastic slow smoothing period
Signal__StochAppliedSTO_LOWHIGHStochastic price application method
Signal__MAPeriod25Additional 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.