EA-23386 · Trend Following

iMA iStochastic Custom

This EA combines a Moving Average (iMA) trend filter with a Stochastic Oscillator (iStochastic) to generate trade signals. It enters long positions when the price is above the MA and the Stochastic exits oversold territory, and enters shorts when the price is below the MA and the Stochastic exits overbought territory. The strategy aims to capture trend-following entries on momentum reversals within the prevailing trend direction.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsMA, Stochastic
AuthorCopyright © 2018, Vladimir Karputov

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+0.96%+0.83%4.82%12150.00%0.240.207+$1.08Reliable
GBPUSD+1.83%+1.59%4.12%12448.00%0.350.447+$1.68Reliable
USDJPY+5.65%+4.90%3.92%12055.50%1.151.443+$4.88Reliable
XAUUSD+77.50%+60.66%30.20%11853.00%1.102.575+$68.36Reliable

Profitable on 4 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 Trend Following EAs with a reliable result on the same market: EURUSD: better than 67% of 95 · GBPUSD: better than 61% of 95 · USDJPY: better than 97% of 95 · XAUUSD: better than 84% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD46%+2.61% 2026-04-1.27% 2026-03
GBPUSD54%+3.20% 2026-04-2.99% 2026-03
USDJPY54%+2.86% 2026-07-0.83% 2026-08
XAUUSD62%+70.48% 2026-02-13.23% 2026-08

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

The strategy employs a dual-indicator combination approach, using a Moving Average as the trend direction filter and the Stochastic Oscillator as the entry timing trigger. Entry conditions require: long positions when price is above the MA and the Stochastic crosses upward from oversold territory (below the 20 level), and short positions when price is below the MA and the Stochastic crosses downward from overbought territory (above the 80 level). Exit conditions typically rely on Stochastic reverse crossovers or fixed stop-loss and take-profit levels. Position sizing uses a fixed lot approach, lacking dynamic lot calculation based on volatility or account risk percentage. Money management is limited to basic stop-loss settings, missing advanced risk management features such as trailing stops, partial closes, or break-even functionality. The overall strategy logic is simple and intuitive, suitable for trending markets, but prone to frequent false signals and consecutive losses in choppy or ranging market conditions.

Strengths

  • Dual-indicator combination effectively filters false signals in ranging markets, improving entry quality
  • Clear and understandable strategy logic, suitable for beginners to comprehend and optimize parameters
  • Trend-following concept is sound, performing well in clearly trending market conditions

Weaknesses

  • Fixed lot sizing lacks dynamic position management, unable to adapt risk exposure based on market volatility
  • Missing trailing stop mechanism, profitable positions may give back significant gains during retracements
  • Generates frequent false breakout signals in choppy consolidation markets leading to consecutive losses
  • No new bar check mechanism, potentially opening duplicate positions on the same candle

Possible improvements

  • Add ATR-based dynamic stop-loss, take-profit, and trailing stop mechanisms to enhance risk management
  • Implement new bar check and position check logic to prevent duplicate entries and overexposure
  • Introduce multi-timeframe confirmation, e.g., confirming trend on H4 before seeking entries on H1

Risk assessment

Overall risk: Medium

  • Fixed lot size does not adjust for account balance and volatility, potentially creating excessive risk exposure during large moves
  • Missing new bar check mechanism creates risk of duplicate position opening on the same candle
  • Stop-loss and take-profit may default to zero, creating potential for unlimited losses without protection

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.3

Parameters

ParameterDefaultDescription
MAPeriod14Moving average period
MA_MethodMODE_SMAMoving average calculation method
MA_Applied_PricePRICE_CLOSEMoving average applied price
Stochastic_KPeriod5Stochastic K period
Stochastic_DPeriod3Stochastic D period
Stochastic_Slowing3Stochastic slow smoothing period
Stochastic_Oversold20Oversold threshold
Stochastic_Overbought80Overbought threshold
StopLoss0Stop loss in points
TakeProfit0Take profit in points
LotSize0.1Fixed trading lot size

Similar Trend Following 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.