MSP Open Alpha 1
- Experts
-
Christophe Trouillas
━━━━━━━━━━━━━━━━
👨💻 ABOUT US
━━━━━━━━━━━━━━━━
MetaSignalsPro is led by a dedicated team of algo traders/developers and risk managers with over 15 years of live market experience.
We design, test, and run our systems with discipline because we use them for our own capital first. - Version: 1.0
A compact trend-following system for XAUUSD on M30, built around a classic EMA crossover with a higher-period direction filter. Designed as a clean, readable starting point to understand how a mechanical trend strategy behaves.
[ MSP Open Alphas Dedicated group ]
Strategy typology
- Trend-following EMA crossover system on closed M30 bars, distributed for XAUUSD.
- Single-position design ("one trade at a time"): a new signal is ignored while any strategy position or pending order is still open — no pyramiding.
- Intraday: entries are restricted to a broker server-time window (07:00–19:00 by default).
Entries
- Signals are evaluated once per new bar — entries never repaint.
- Buy: the fast EMA (20) crosses above the slow EMA (50) between the last two closed bars, and the latest close is above both the fast EMA and the 200 EMA trend line.
- Sell: the exact mirror image (cross below, close below fast EMA and below EMA 200).
- Executed as market orders at the current ask/bid.
Exits
- Every position carries a stop-loss at a fixed percentage of the entry price (1% by default).
- No take-profit (TP = 0) and no signal-based exit: a trade runs until its stop-loss or the daily close.
- Once per day at a configurable server time (20:00 by default), all strategy positions are closed and all pending orders deleted.
Capital Protection
- Risk-based position sizing: a fixed percentage of the balance (1% by default) is risked per trade; lot size is derived from the stop-loss distance using tick size, tick value and lot step, then clamped to the broker's min/max volume.
- New orders are rejected when free margin is insufficient and no-change SL/TP modifications are rejected, while position-reducing and closing orders are always allowed.
- MagicNumber + comment ownership tags ensure the EA only scans and manages its own positions and orders.
Backtest Results — XAUUSD M30, 2020.01.01 – 2026.10.01
Broker: IC Markets (EU) Ltd · USD account · initial deposit 1,000.00 · leverage 1:50 · "Every tick" model · history quality 99% (79,801 bars / 9,542,122 ticks) · all inputs at defaults.
| Metric | Value |
|---|---|
| Total net profit | +1,107.33 USD (+110.73% on the 1,000 USD deposit) |
| Profit factor | 1.46 (gross profit 3,522.91 vs gross loss −2,415.58) |
| Win rate | 52.80% — 264 of 500 trades (longs 51.45% won, shorts 54.46% won) |
| Expected payoff | +2.21 USD per trade |
| Max drawdown | Balance: 136.08 USD (8.07%) · Equity: 145.25 USD (8.59%) |
| Recovery factor / Sharpe ratio | 7.62 / 4.13 |
| Largest win / largest loss | +105.28 / −51.81 USD (avg win +13.34 vs avg loss −10.24) |
| Max consecutive losses | 8 trades (−28.41 USD total) |
| Average holding time | 6h 08m (min 5m 40s, max 34h 30m) |
| Margin level at end | 1,046.29% (low margin usage thanks to 1% risk sizing) |
What the numbers show:
- Positive expectancy: profit factor 1.46 with average win (+13.34) clearly larger than average loss (−10.24) — the edge comes from payoff asymmetry, not from a high win rate.
- Balanced long/short activity (276 long / 224 short trades, both ~52–54% winners) — the logic is not a one-directional curve-fit.
- Drawdown stayed in single digits (max 8.59% of equity) over ~6.8 years — consistent with the 1%-per-trade risk sizing and the daily close-all.
- AHPR 1.0016 / GHPR 1.0015 with LR correlation 0.96: the equity curve grows steadily hour-by-hour and day-by-day, not from one lucky spike.
Note: these results come from one broker, one symbol, one period and one set of inputs, on a 1,000 USD demo-style backtest. They show how the code behaves in the Strategy Tester — they are not a promise of future results (see Risk Warning below).
Backtest & Setup Guide
- EA launching asset: XAUUSD (Gold)
- Strategy Timeframes: M30
- Minimum / Recommended deposit: 200 / 500 USD (demo-first recommended)
- VPS recommended for stable execution
- Preferred Broker: ICMarkets
Inputs
- FastEmaPeriod — fast EMA period (20).
- SlowEmaPeriod — slow EMA period (50); must be greater than FastEmaPeriod .
- TrendEmaPeriod — trend filter EMA period (200).
- EntryStartHour / EntryStartMinute — entry window open, server time (7:00).
- EntryEndHour / EntryEndMinute — entry window close, server time (19:00).
- ExitHour / ExitMinute — daily close-all time, server time (20:00).
- RiskPercent — account risk per trade, in percent (1.0 = 1% of balance).
- StopLossPercent — stop-loss distance as a percent of the entry price (1%).
What this EA is and what it is not
- This EA is an educational algo, not a production-ready algo
- This EA is part of the MSP Open Alpha series: open source codes by Meta Signals Pro - Research Lab
- It is intentionally simple: it is a learning and experimentation tool, not a fully optimized trading system.
- If you want professional algos, explore MetaSignalsPro products on the MQL5 marketplace
Risk Warning
- Past performance is not a guarantee of future profitability
- No trading system can win 100% of the time
- Check our post How not to be fooled when you buy an algo
