EA-22116 · Trend Following

Exp_MA_Rounding_Candle_MMRec

This EA trades based on the MA_Rounding_Candle custom indicator, which applies a rounding coefficient to a smoothed moving average and generates buy/sell signals from the rounded candle colors. It features adaptive money management that reduces position size after consecutive losses and uses separate magic numbers for long and short positions.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, H1, H4, D1
IndicatorsMA_Rounding_Candle, SMA, EMA, SMMA, LWMA, JJMA, JurX, ParMA, T3, VIDYA, AMA
AuthorCopyright © 2018, Nikolay Kositsin

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+6.01%+5.20%4.57%8051.90%1.211.316+$8.04Reliable
GBPUSD+0.50%+0.44%5.26%8144.40%0.110.106+$0.62Reliable
USDJPY-5.19%-4.53%8.41%12947.70%-0.84-0.626−$4.11Reliable
XAUUSD-52.39%-45.84%85.81%7447.30%-0.05-0.616−$70.80Reliable

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 Trend Following EAs with a reliable result on the same market: EURUSD: better than 92% of 95 · GBPUSD: better than 51% of 95 · USDJPY: better than 15% of 95 · XAUUSD: better than 21% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD62%+2.21% 2026-03-2.28% 2026-02
GBPUSD54%+2.48% 2026-01-2.85% 2026-10
USDJPY54%+1.48% 2026-05-2.45% 2026-08
XAUUSD23%+53.38% 2026-11-45.00% 2026-10

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 concept is based on the MA_Rounding_Candle custom indicator, which applies a rounding coefficient to a smoothed moving average and generates candlestick-style signals from the rounded values. Entry conditions: when indicator buffer value equals 2, a buy signal is generated (confirmed if previous value was not 2); when value equals 0, a sell signal is generated (confirmed if previous value was not 0). Exit conditions include closing opposite positions on signal reversal and using fixed StopLoss and TakeProfit in points. Position management uses separate magic numbers for long and short positions, allowing independent control of each direction. Money management is the core feature — the BuyTradeMMRecounterS and SellTradeMMRecounterS functions adjust position size based on the number of losing trades among the last N trades, reducing exposure to SmallMM_ ratio during losing streaks and using MM ratio during normal trading. This adaptive money management mechanism helps effectively control drawdowns during adverse market conditions.

Strengths

  • Adaptive money management: dynamically adjusts position size based on recent trade losses, automatically reducing exposure to SmallMM_ ratio during drawdowns, effectively controlling risk
  • Independent long/short management: uses separate magic numbers and independent MM parameters for each direction, allowing granular control over trading behavior and risk per direction
  • Signal deduplication: prevents duplicate entries by comparing current and previous indicator values, and uses IsNewBar check to ensure signals are calculated only once per bar
  • Supports 10 smoothing algorithms: offers multiple MA methods (SMA/EMA/JJMA/JurX/T3/VIDYA/AMA etc.), providing high strategy flexibility
  • Default 2:1 reward-to-risk ratio: TakeProfit is twice StopLoss (2000 vs 1000 points), pursuing a positive expectancy trading system

Weaknesses

  • Depends on custom indicator: EA relies on external MA_Rounding_Candle indicator; missing or mismatched indicator file will cause runtime failure
  • No spread filter: EA lacks spread checking, potentially causing excessive entry costs in high-spread environments, especially detrimental for shorter-term trading
  • Fixed SL/TP in points: uses fixed point-based stop loss and take profit rather than dynamic ATR-based levels, unable to adapt to varying market volatility
  • MMMode defaults to LOT: default money management mode is fixed lot rather than dynamic calculation based on account balance or free margin, potentially underutilizing the adaptive MM feature
  • No forced new bar check: when SignalBar is 0, the IsNewBar check is skipped, potentially causing repeated signal calculations within the same bar and logical confusion

Possible improvements

  • Add spread filter: check current spread against a threshold before entry, avoiding opening positions during high-spread periods
  • Use ATR-based dynamic SL/TP: replace fixed point-based stop loss and take profit with ATR-based dynamic calculation to better adapt to changing market volatility

Risk assessment

Overall risk: Medium

  • StopLoss of 1000 points is large but 2:1 R:R is reasonable; slippage impact needs monitoring
  • Adaptive MM only reduces ratio from 0.1 to 0.01 (10x reduction) during losses; effective but may not be conservative enough in extreme market conditions
  • SignalBar=0 skips IsNewBar check, potentially causing repeated signal calculation within the same bar

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management4.0
Robustness3.0
Innovation3.0
Documentation2.0
Overall3.0

Parameters

ParameterDefaultDescription
BuyMagic777Magic number for Buy direction
SellMagic888Magic number for Sell direction
BuyTotalMMTriger5Recent trades for Buy stop loss calculation
BuyLossMMTriger3Loss trade count threshold to reduce Buy MM
SellTotalMMTriger5Recent trades for Sell stop loss calculation
SellLossMMTriger3Loss trade count threshold to reduce Sell MM
SmallMM_0.01Fund ratio per trade during losing streak
MM0.1Fund ratio per trade under normal conditions
MMModeLOTLot sizing method (Free Margin/Balance/Loss/Fixed Lot)
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum price deviation in points (slippage tolerance)
BuyPosOpentrueAllow opening long positions
SellPosOpentrueAllow opening short positions
BuyPosClosetrueAllow closing long positions
SellPosClosetrueAllow closing short positions
InpInd_TimeframePERIOD_H1Timeframe for MA_Rounding_Candle indicator
XMA_MethodMODE_SMA_MA smoothing method (SMA/EMA/SMMA/LWMA/JJMA/JurX/ParMA/T3/VIDYA/AMA)
XLength12Smoothing depth (MA period)
XPhase15Smoothing parameter (-100 to +100 for JJMA, CMO period for VIDYA, slow MA period for AMA)
MaRound50Rounding coefficient
Gap10Gap size in points to ignore
SignalBar1Entry signal bar index

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.