Exp_Laguerre
This EA trades based on the Laguerre indicator's trend direction changes, opening buy positions when the trend shifts upward and sell positions when it shifts downward. It uses the ColorLaguerre custom indicator with configurable gamma and threshold levels to generate signals, and includes both entry and exit logic tied to the same indicator flips. Position sizing is handled via the TradeAlgorithms library supporting multiple margin modes.
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 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
Why this EA never traded: no entry rule survived the conversion.
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 concept is based on the Laguerre filter's trend direction assessment, where the filter uses a gamma parameter to control smoothness and filter market noise. Entry conditions: a buy signal is generated when the ColorLaguerre indicator buffer value changes from 1 to 2 (uptrend confirmed), and a sell signal is generated when it changes from 2 to 1 (downtrend confirmed). Exit conditions are symmetric to entries: close sell positions on uptrend flips and close buy positions on downtrend flips, with additional close signals triggered when the opposite trend persists and corresponding switches are enabled. Position sizing supports five modes: free margin percentage, balance percentage, loss-adjusted free margin, loss-adjusted balance, and fixed lot size. Money management uses the MM parameter to control risk proportion, defaulting to 0.1 (10%). Stop loss and take profit are set in points at 1000 and 2000 respectively, yielding a risk-reward ratio of 1:2. The strategy checks for signals only on new bar openings to avoid repeated trading within the same bar, but lacks protection against stacking positions or handling counter-trend hedging scenarios.
Strengths
- The Laguerre filter effectively suppresses price noise, reducing false signals
- Multiple position sizing modes provide flexibility for different risk preferences
- Symmetric entry and exit logic with independent on/off switches allows flexible configuration
- IsNewBar mechanism restricts signal detection to once per bar, preventing duplicate trades
- Pre-set stop loss and take profit with a reasonable 1:2 risk-reward ratio
Weaknesses
- No check for existing position count, potentially stacking positions in the same direction
- No spread filter, high-spread environments may cause excessive trading costs on frequent signals
- Stop loss 1000 and take profit 2000 points are large and not adaptive to different instruments or volatility regimes
- Indicator flip signals may occur frequently in ranging markets, causing repeated open/close cycles with losses
- Duplicate #include directive for TradeAlgorithms.mqh (lines 12 and 54) indicates a coding oversight
Possible improvements
- Add existing position direction and count checks to prevent position stacking in the same direction
- Add spread filter and time filter (e.g., avoid news releases) to reduce trading in unfavorable conditions
- Replace fixed SL/TP with ATR-based dynamic calculation to adapt to different instruments and volatility
- Remove the duplicate #include <TradeAlgorithms.mqh> directive to keep the code clean
Risk assessment
Overall risk: Medium
- No position count check may lead to stacking positions in the same direction, increasing exposure
- Laguerre indicator may flip frequently in ranging markets, generating consecutive losing signals
- Fixed point-based SL/TP lacks adaptability to different instruments' volatility characteristics
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio or fixed lot size |
MMMode | LOT | Lot mode: free margin/balance/post-loss margin/post-loss balance/fixed lot |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Allow opening long positions |
SellPosOpen | true | Allow opening short positions |
BuyPosClose | true | Allow reverse closing long positions |
SellPosClose | true | Allow reverse closing short positions |
InpInd_Timeframe | PERIOD_H1 | ASCtrend indicator timeframe |
gamma | 0.7 | Laguerre smoothing parameter; higher = smoother |
HighLevel | 85 | Indicator upper threshold level |
MiddleLevel | 50 | Indicator middle threshold level |
LowLevel | 15 | Indicator lower threshold level |
SignalBar | 1 | Signal bar index; 0=current, 1=last closed bar |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.