EA-1161 · Mean Reversion

Kloss

The Kloss EA is a mean-reversion trading system that uses CCI, Stochastic, and LWMA to identify overbought/oversold conditions for entry. It opens buy positions when CCI is deeply oversold, Stochastic main is below a threshold, and price is above the MA, and vice versa for sell signals. It features an MWMode mechanism that defers SL/TP placement until after position open to avoid broker rejection on tight stops.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsLWMA, CCI, Stochastic
AuthorInteger

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+3.66%+3.17%3.35%14254.60%0.781.095+$2.84Reliable
GBPUSD+9.98%+8.62%4.22%14457.30%1.572.374+$7.15Reliable
USDJPY-2.17%-1.89%7.55%14451.70%-0.37-0.295−$1.63Reliable
XAUUSD-57.48%-50.67%100.00%15149.00%0.77-0.575−$38.07Reliable

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 80% of 30 · GBPUSD: better than 97% of 32 · USDJPY: better than 31% of 32 · XAUUSD: better than 23% of 31

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD69%+2.31% 2026-07-2.09% 2026-09
GBPUSD69%+3.25% 2026-07-1.81% 2026-01
USDJPY46%+3.32% 2026-09-3.89% 2026-01
XAUUSD38%+42.14% 2026-05-50.86% 2026-01

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

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

This strategy is based on the mean reversion concept, assuming that prices will revert to the mean after deviating. Entry conditions: a buy signal requires CCI below -CCIDiffer (default -120), Stochastic main line below 50-StDiffer (default 30), and close price above the LWMA; sell signals are the mirror opposite with CCI above +CCIDiffer, Stochastic above 50+StDiffer, and close below the MA. Exit conditions come in two forms: stop loss/take profit triggers (default 550 points each), or reverse signal closure when RevClose is enabled. Position sizing supports both fixed lots and risk-based dynamic lot calculation, where Lots=0 triggers calculation using account free margin multiplied by MaximumRisk divided by 1000. Money management is handled by fLotsNormalize which rounds lot size to conform with broker minimum volume and step requirements. The MWMode mechanism is a clever design that opens positions with zero SL/TP first, then modifies them on subsequent ticks via PositionModify, adjusting to satisfy StopsLevel requirements and avoiding rejection for stops being too close at order time.

Strengths

  • Triple indicator filter (CCI + Stochastic + MA) reduces false signals with strict entry conditions
  • The MWMode mechanism cleverly solves the problem of broker rejection for stops being too close, improving order fill rates
  • Position sizing supports both fixed lots and dynamic risk-based calculation, offering good flexibility
  • Symmetric SL/TP that can each be set to 0 to disable, giving traders ample parameter tuning space
  • All indicator parameters and shift offsets are adjustable, facilitating optimization and backtesting across timeframes

Weaknesses

  • MAPeriod defaults to 1, making the LWMA essentially the price itself, which severely weakens its filtering purpose
  • The dynamic lot formula (FreeMargin * MaximumRisk / 1000) lacks theoretical basis and does not account for stop loss distance
  • The rv variable in SolveLots is always true with no actual lot validity verification, making the return value meaningless
  • No proper new bar check mechanism; when ZeroBar is true, trading logic may execute on every tick
  • No spread filter — entries can occur during wide spreads, which is detrimental for a mean reversion strategy

Possible improvements

  • Change MAPeriod default from 1 to a reasonable period (e.g., 14-20) so the MA actually serves as a trend filter
  • Improve dynamic lot calculation to risk-based sizing: lots = risk amount / (stop loss points * point value), which is the standard position sizing approach
  • Add a spread filter to prevent entries when the spread exceeds a threshold, avoiding excessive slippage

Risk assessment

Overall risk: Medium

  • MAPeriod=1 disables the MA filter, leaving the strategy without trend direction confirmation and potentially causing frequent counter-trend entries
  • Lot calculation ignores stop loss distance, which can lead to excessive per-trade risk on volatile instruments
  • When ZeroBar is true, there is no effective new bar check, potentially causing repeated trades within the same bar

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
Lots0.1Fixed trading lot size
MaximumRisk0.05Risk percentage for dynamic lot calculation when Lots=0
StopLoss550Stop loss in points; 0 disables stop loss
TakeProfit550Take profit in points; 0 disables take profit
RevClosetrueClose position on reverse signal
MAPeriod1MA indicator period
MAMethodMODE_LWMAMA method; default is linear weighted moving average
MAPricePRICE_TYPICALMA applied price type
MAShift5MA bar shift offset
PShift1Price bar shift offset
CCIPeriod10CCI indicator period
CCIPricePRICE_WEIGHTEDCCI applied price type
CCIDiffer120CCI threshold level for deviation from zero
CCIShift0CCI bar shift offset
StKPeriod5Stochastic K period
StDPeriod3Stochastic D-line period
StSPeriod3Stochastic smoothing period
StMethodMODE_SMAStochastic calculation method
StPriceSTO_LOWHIGHStochastic price type
StShift0Stochastic bar shift for check
StDiffer20Stochastic threshold, deviation from level 50
CommonShift1Common shift added to all indicator Shift variables
MWModetrueSet SL/TP after open to avoid rejection

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.