EA-15165 · Trend Following

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

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsLaguerre
Author—

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.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

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation2.0
Documentation1.0
Overall2.3

Parameters

ParameterDefaultDescription
MM0.1Money management ratio or fixed lot size
MMModeLOTLot mode: free margin/balance/post-loss margin/post-loss balance/fixed lot
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum allowed slippage
BuyPosOpentrueAllow opening long positions
SellPosOpentrueAllow opening short positions
BuyPosClosetrueAllow reverse closing long positions
SellPosClosetrueAllow reverse closing short positions
InpInd_TimeframePERIOD_H1ASCtrend indicator timeframe
gamma0.7Laguerre smoothing parameter; higher = smoother
HighLevel85Indicator upper threshold level
MiddleLevel50Indicator middle threshold level
LowLevel15Indicator lower threshold level
SignalBar1Signal 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.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.