Exp_MaByMa
This EA trades based on crossover signals from a custom 'MaByMa' indicator, which smooths one moving average by another. It opens buy positions when the indicator line crosses above the signal line and sell positions on the opposite crossover, with configurable money management and stop-loss/take-profit 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 | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Custom indicator approximated |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Custom indicator approximated |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Custom indicator approximated |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Custom indicator approximated |
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 strategy core is a dual-smoothed moving average crossover system using the MaByMa indicator, which applies a second smoothing to one moving average to reduce false signals. Entry conditions: a buy signal is generated when the indicator line Ind crosses above the signal line Sign, and a sell signal on the opposite crossover, with trades only triggered on actual crossovers. Exit conditions rely on fixed stop-loss and take-profit in points, and also support signal-based exits where a buy signal closes sell positions and vice versa. Position sizing supports five modes: fixed lot, balance percentage, free margin percentage, loss-adjusted balance percentage, and loss-adjusted free margin percentage. Money management is controlled by the MM parameter with a default of 0.1, representing the risk fraction. The strategy uses the SignalBar parameter to determine which bar to check for signals, defaulting to 1 (the last closed bar), which helps avoid signal flickering from unclosed bars.
Strengths
- Dual-smoothed moving average design effectively reduces false signals common in single MA crossovers, improving signal quality
- Supports 10 smoothing algorithms (SMA/EMA/SMMA/LWMA/JJMA/JurX/ParMA/T3/VIDYA/AMA), offering high flexibility
- Provides 5 position sizing modes and configurable stop-loss/take-profit, with relatively complete money management
- Uses SignalBar=1 to detect signals on closed bars, avoiding signal flickering from unclosed bars
- Independent on/off switches for buy/sell open/close operations, allowing flexible strategy behavior control
Weaknesses
- Default 1000-point SL and 2000-point TP may be oversized for H12 timeframe, lacking ATR-based dynamic stop-loss
- No spread filter, potentially entering at large slippage during low-liquidity sessions
- Dual-smoothed MAs are inherently lagging indicators, causing significant entry delay on trend reversals
- No trailing stop functionality, unable to lock in floating profits during trending markets
- Depends on external custom indicator MaByMa and two include files, increasing deployment complexity
Possible improvements
- Add ATR-based dynamic stop-loss and take-profit mechanism to automatically adjust stop distances based on market volatility
- Add spread filter and trading session filter to avoid entering under unfavorable conditions
Risk assessment
Overall risk: Low
- Fixed stop-loss/take-profit lacks adaptability to changing market volatility; stops may be too close during high-volatility periods
- No maximum position or maximum drawdown limit, potentially sustaining continuous losses in extreme markets
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio parameter |
MMMode | LOT | Lot sizing mode (fixed lot/balance %/free margin % etc.) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum slippage in points |
BuyPosOpen | true | Allow buy position opening |
SellPosOpen | true | Allow sell position opening |
BuyPosClose | true | Allow buy-side close (close sell on reverse signal) |
SellPosClose | true | Allow sell-side close (close buy on reverse signal) |
InpInd_Timeframe | PERIOD_H12 | Indicator timeframe |
MA_Method1 | MODE_SMA | First MA smoothing method |
Length1 | 7 | First-layer MA period |
Phase1 | 15 | First-layer MA phase parameter (used by JJMA/VIDYA/AMA) |
MA_Method2 | MODE_JJMA | Second-layer MA smoothing method |
Length2 | 7 | Second-layer MA period |
Phase2 | 15 | Second-layer MA phase parameter (used by JJMA/VIDYA/AMA) |
IPC | PRICE_CLOSE | Applied price type |
SignalBar | 1 | Signal detection bar index (0=current bar, 1=last closed bar) |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.