MA L WORLD
This EA uses a linearly weighted moving average (LWMA) crossover signal between a fast 12-period and slow 25-period MA to generate trade entries and exits. It trails positions using a 92-period EMA and manages risk with a fixed-margin money management module allocating 1% of margin per trade. The strategy is a standard MQL5 Standard Library-based trend following system with configurable signal thresholds and stop/take levels.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | +4.62% | +4.00% | 2.91% | 97 | 49.50% | 0.98 | 1.59 | 7 | +$5.16 | Reliable |
| GBPUSD | +0.34% | +0.30% | 6.53% | 93 | 45.20% | 0.09 | 0.05 | 6 | +$0.63 | Reliable |
| USDJPY | +5.18% | +4.49% | 4.83% | 120 | 51.70% | 1.02 | 1.07 | 5 | +$4.32 | Reliable |
| XAUUSD | -76.46% | -69.73% | 91.79% | 118 | 44.90% | -0.57 | -0.83 | 5 | −$63.23 | Reliable |
Profitable on 3 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 85% of 95 · GBPUSD: better than 49% of 95 · USDJPY: better than 95% of 95 · XAUUSD: better than 17% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 77% | +1.54% 2026-03 | -1.76% 2026-06 |
| GBPUSD | 38% | +3.47% 2026-01 | -1.55% 2026-10 |
| USDJPY | 46% | +3.61% 2026-09 | -2.01% 2025-12 |
| XAUUSD | 46% | +50.22% 2026-11 | -54.70% 2026-08 |
From the backtest equity curve, sampled about every two days; only reliable results.
Strategy analysis
The core strategy of this EA is based on the crossover of two moving averages to determine trend direction: a buy signal is generated when the fast MA (12-period LWMA) crosses above the slow MA (25-period LWMA), and a sell signal when it crosses below. Entry conditions are controlled by a signal threshold (ThresholdOpen=20), where trades are only opened when signal strength exceeds the threshold, and positions are closed when signal strength drops below the close threshold (ThresholdClose=20). Exit conditions include a fixed stop loss at 95 points and take profit at 670 points, along with a 92-period EMA trailing stop to follow trends. Position sizing uses a fixed margin percentage approach, allocating 1% of available margin per trade through the CMoneyFixedMargin class. In terms of money management, the take profit is significantly larger than the stop loss (670:95, approximately 7:1 reward-to-risk ratio), which is characteristic of trend-following strategies that rely on a few large winners to cover multiple small losses. The overall strategy logic is clear and follows a classic MA crossover trend-following approach, but it lacks filters for ranging markets and more sophisticated risk controls.
Strengths
- Uses the MQL5 Standard Library (CExpert framework) with well-structured, modular code that is easy to maintain and extend
- The reward-to-risk ratio of approximately 7:1 (670:95) aligns with trend-following strategy principles and supports long-term positive expectancy
- Employs fixed margin percentage money management at 1% per trade, providing conservative risk control
- Trailing stop uses an independent 92-period EMA, which effectively follows trends and protects accumulated profits
- The signal threshold mechanism provides additional entry filtering, preventing trades on weak signals
Weaknesses
- The strategy is overly simplistic, relying solely on MA crossover as a single signal, which generates numerous false signals and frequent losses in ranging markets
- Lacks a new bar check mechanism, potentially opening repeated positions within the same bar and increasing unnecessary trading costs
- No spread filter or trading session filter, meaning it will still trade during high-spread periods or low liquidity hours
- Fixed stop loss of 95 points performs very differently under varying volatility conditions, without considering dynamic stops like ATR-based levels
- Signal weight is set to 1.0 with only one filter, unable to improve entry quality through multi-signal confirmation
Possible improvements
- Add a ranging market filter (such as ADX or ATR threshold) to disable trading during low trend strength periods and reduce false signals
- Implement new bar checking and spread filtering to prevent repeated entries on the same bar and trading during high-spread periods
- Consider using ATR-based dynamic stop loss instead of fixed point stops, making risk management adaptive to market volatility changes
Risk assessment
Overall risk: Medium
- Lacks new bar check mechanism, potentially causing over-trading through repeated entries within the same bar
- Fixed 95-point stop loss does not account for market volatility, which may be too tight on volatile instruments and trigger frequent stops
- No spread filter or trading session filter, potentially entering under unfavorable conditions
- Single MA crossover signal is prone to consecutive losses in ranging markets
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Expert_Title | "MA L WORLD" | EA document name |
Expert_MagicNumber | 18884 | EA magic number for identifying its orders |
Expert_EveryTick | false | Execute trading logic on every tick |
Signal_ThresholdOpen | 20 | Open position signal threshold [0...100] |
Signal_ThresholdClose | 20 | Close position signal threshold [0...100] |
Signal_PriceLevel | 2.0 | Price level for trade execution |
Signal_StopLevel | 95.0 | Stop loss level (points) |
Signal_TakeLevel | 670.0 | Take profit level (points) |
Signal_Expiration | 0 | Pending order expiration (bars) |
Signal_MACROSS_PeriodMA1 | 12 | Fast MA period |
Signal_MACROSS_PeriodMA2 | 25 | Slow MA period |
Signal_MACROSS_Shift | 0 | MA time shift |
Signal_MACROSS_Method | MODE_LWMA | MA calculation method (linear weighted) |
Signal_MACROSS_Applied | PRICE_CLOSE | MA applied price (close price) |
Signal_MACROSS_Set_MAC_timeframe | PERIOD_CURRENT | MA crossover signal timeframe |
Signal_MACROSS_Weight | 1.0 | Signal filter weight [0...1.0] |
Trailing_MA_Period | 92 | Trailing stop MA period |
Trailing_MA_Shift | 0 | Trailing stop MA shift |
Trailing_MA_Method | MODE_EMA | Trailing stop MA method (exponential smoothing) |
Trailing_MA_Applied | PRICE_CLOSE | MA applied price for trailing stop |
Money_FixMargin_Percent | 1.0 | Margin percentage per trade |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.