starter.mq5
This EA trades based on the Laguerre indicator combined with CCI and MA crossover signals. It opens buy positions when Laguerre is zero, MA is rising, and CCI is below a negative threshold, and sell positions on the mirror conditions. Positions are closed when Laguerre reaches opposite extreme levels, with optional virtual stop-loss/take-profit functionality.
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 | -5.99% | -5.23% | 11.18% | 48 | 29.80% | -1.07 | -0.54 | 10 | −$13.39 | Reliable |
| GBPUSD | +3.88% | +3.36% | 6.49% | 1 | 0.00% | — | — | — | — | Too few trades |
| USDJPY | -1.71% | -1.49% | 7.69% | 25 | 50.00% | -0.20 | -0.22 | 2 | −$8.09 | Reliable |
| XAUUSD | -2.39% | -1.98% | 84.46% | 30 | 41.40% | 0.47 | -0.03 | 9 | −$169.59 | Reliable |
Profitable on 0 of 3 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 Momentum EAs with a reliable result on the same market: EURUSD: better than 12% of 68 · USDJPY: better than 41% of 68 · XAUUSD: better than 53% of 75
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 54% | +1.72% 2026-01 | -5.26% 2026-03 |
| USDJPY | 54% | +2.62% 2025-11 | -3.96% 2026-09 |
| XAUUSD | 62% | +55.46% 2026-01 | -55.28% 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 concept is based on the Laguerre indicator's overbought/oversold states combined with CCI momentum confirmation and MA trend direction filtering. Entry conditions: a buy requires Laguerre at 0 (extreme oversold), MA current value above previous value (uptrend confirmation), and CCI below the negative threshold (momentum at downward extreme); sell conditions are the mirror image with Laguerre at 1 (extreme overbought), MA declining, and CCI above the positive threshold. Exit conditions: buy positions close when Laguerre exceeds 0.9, sell positions close when Laguerre drops below 0.1. Position sizing supports fixed lots or proportional risk calculation based on free margin, with a lot decrease factor after consecutive losses (DecreaseFactor). Money management calculates lots as free margin multiplied by risk percentage divided by 1000, with lot normalization to satisfy broker minimum, maximum, and step requirements. The virtual SL/TP feature simulates stop-loss and take-profit by checking position P&L on every tick rather than placing actual SL/TP orders on the server.
Strengths
- Triple indicator filtering (Laguerre+CCI+MA) reduces false signals
- Virtual SL/TP hides trading intentions from brokers who might otherwise see strategy levels
- Lot decrease mechanism after losses helps control risk exposure during losing streaks
- Lot normalization is thorough, accounting for broker minimum/maximum/step constraints
Weaknesses
- Sell opening incorrectly calls SolveBuySL and SolveBuyTP instead of SolveSellSL and SolveSellTP, a critical logic bug
- CCI level default of 5 is extremely low, making the CCI filter virtually useless as nearly all market conditions satisfy it
- Shift default of 0 means trading on an uncompleted bar, prone to false signals and repainting issues
- No spread filter or trading session filter, will trade even during extreme spreads or inactive hours
Possible improvements
- Fix the critical bug where sell opening calls SolveBuySL/SolveBuyTP instead of SolveSellSL/SolveSellTP
- Change Shift default to 1 to avoid trading on uncompleted bars and repainting issues
- Add spread filter and trading session filter functionality
- Raise CCILevel default to a more reasonable value (e.g., 50-100) so the CCI filter is actually effective
Risk assessment
Overall risk: Medium
- Incorrect SL/TP function calls for sell direction may place stops in the wrong direction
- Trading on uncompleted bars with Shift=0 risks signal flickering and repeated entries
- Virtual SL/TP depends on client-side execution; disconnection means stops won't trigger
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Lots | 0.1 | Fixed lot size; 0 uses risk percentage |
MaximumRisk | 0.05 | Risk percentage; used when Lots is 0 |
DecreaseFactor | 0 | Lot decrease factor after loss; 0 disables |
StopLoss | 100 | Stop loss in points |
TakeProfit | 0 | Take profit in points |
VirtualSLTP | true | Whether to use virtual SL/TP |
LagGamma | 0.7 | Laguerre indicator parameter |
CCIPeriod | 14 | CCI period |
CCIPrice | PRICE_CLOSE | CCI applied price |
CCILevel | 5 | CCI threshold level |
MAPeriod | 5 | MA period |
MAShift | 0 | MA shift |
MAMethod | MODE_EMA | MA method |
MAPrice | PRICE_MEDIAN | MA applied price |
Shift | 0 | Bar index for indicator check: 0=current bar, 1=last completed bar |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.