EA-15781 · Mean Reversion

Exp_iStochKomposter

This EA trades based on signals from the custom iStochKomposter indicator, a Stochastic-based oscillator with overbought/oversold levels. It opens buy positions on oversold signals and sell positions on overbought signals, with configurable close-on-opposite-signal logic. Position sizing uses a flexible money management system supporting lot, free margin, balance, and loss-based modes.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsStochastic, ATR, iStochKomposter
Author—

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.00%0.00%0.00%0—————Not convertible yet

Why this EA never traded: no entry rule survived the conversion.

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 EA's strategy is centered on mean reversion trading using the custom iStochKomposter indicator, which is essentially an enhanced Stochastic oscillator combined with an ATR period parameter. Entry conditions are: a buy signal is generated when the indicator's upper buffer (buffer 1) produces a non-zero, non-EMPTY_VALUE on the specified signal bar; a sell signal is generated when the lower buffer (buffer 0) produces a non-zero, non-EMPTY_VALUE on the signal bar. Exit conditions are twofold: closing via opposite signals (buy signal triggers sell position close, sell signal triggers buy position close), and through fixed stop-loss and take-profit levels. For position sizing, the EA offers five money management modes: fixed lot, based on free margin, based on balance, based on post-loss free margin, and based on post-loss balance. The EA implements a new bar detection mechanism to prevent repeated trades within the same candle, and uses a Recount flag to ensure signal recalculation when buffer reads fail. Additionally, when both opening and closing are allowed but no close signal exists, the EA backtracks through historical bars to find the nearest opposite signal to determine whether to close existing positions.

Strengths

  • Implements new bar detection to prevent repeated trades within the same candle, reducing overtrading risk
  • Offers five money management modes providing flexibility for different risk appetites
  • Configurable stop-loss and take-profit with a 1:2 risk-reward ratio (TP=2000, SL=1000)
  • Automatic signal recalculation via Recount flag on buffer read failure enhances robustness
  • Independent open/close switches allow fine-grained strategy configuration

Weaknesses

  • ATR_Period is not declared as input, making it invisible in the EA parameter panel and unoptimizable in the strategy tester
  • The historical bar backtracking loop (line 142) lacks an upper bound, potentially causing performance issues on charts with extensive history
  • No position check before opening trades, risking duplicate positions in the same direction
  • No spread filter — trades may open during high-spread conditions, increasing transaction costs
  • Depends on the external custom indicator iStochKomposter, increasing deployment complexity and dependency risk

Possible improvements

  • Declare ATR_Period as an input variable to make it configurable and optimizable in the strategy tester
  • Add position check logic before opening trades to prevent duplicate same-direction positions
  • Add a maximum bar search limit to the historical backtracking loop to prevent performance degradation

Risk assessment

Overall risk: Medium

  • No position check before opening, risking position accumulation in the same direction
  • Large stop-loss of 1000 points may cause significant single-trade losses on volatile instruments
  • Unbounded historical bar backtracking loop may cause EA lag or timeout in extreme cases

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness3.0
Innovation2.0
Documentation1.0
Overall2.5

Parameters

ParameterDefaultDescription
MM0.1Money management ratio (lot or percentage)
MMModeLOTMargin mode: free margin/balance/net margin/net balance/fixed lot
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum slippage tolerance
BuyPosOpentrueAllow buy to open
SellPosOpentrueAllow sell to open
BuyPosClosetrueAllow buy-side close (close sell on opposite signal)
SellPosClosetrueAllow sell-side close (close buy on opposite signal)
InpInd_TimeframePERIOD_H1Timeframe for indicator calculation
ATR_Period14ATR period (non-input variable)
KPeriod5Stochastic K period
DPeriod3Stochastic D period
Slowing3Stochastic deceleration period
STO_MethodMODE_SMAstochasticindicatorsmoothing method
Price_fieldSTO_LOWHIGHStochastic price field
UpLevel70WPR upper overbought level
DnLevel30WPR lower oversold level
SignalBar1Bar index for signal detection (0=current, 1=completed)

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.