EA-17114 · Trend Following

ZeroLagEA-AIP v0.0.4

ZeroLagEA-AIP is a trend-following Expert Advisor that uses zero-lag moving average indicators to minimize the typical delay of traditional moving averages. It generates entry signals based on zero-lag MA crossovers and trend direction confirmation, aiming to enter trades earlier than conventional MA-based systems. The EA includes adaptive position sizing and risk management features to protect capital while riding trends.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsZeroLag EMA, ZeroLag MA, Trailing Stop
AuthorCopyright © 2005, MetaQuotes Software Corp.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+2.99%+2.59%2.23%5358.50%1.181.344+$5.63Reliable
GBPUSD-1.52%-1.32%4.46%5944.10%-0.38-0.344−$2.58Reliable
USDJPY+3.28%+2.84%3.73%5950.00%0.940.884+$5.92Reliable
XAUUSD+11.54%+9.44%41.30%5754.40%0.460.283+$20.24Reliable

Profitable on 3 of 4 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 Trend Following EAs with a reliable result on the same market: EURUSD: better than 76% of 95 · GBPUSD: better than 33% of 95 · USDJPY: better than 83% of 95 · XAUUSD: better than 61% of 96

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD62%+1.28% 2026-06-0.67% 2026-02
GBPUSD46%+2.29% 2026-06-1.94% 2026-10
USDJPY62%+2.56% 2026-09-2.14% 2026-03
XAUUSD69%+12.45% 2026-04-18.34% 2026-03

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 core strategy concept is trend-following based on crossover signals from zero-lag moving averages. The ZeroLag MA reduces lag by applying error correction to traditional moving averages, producing timelier signals than conventional MAs. Entry conditions typically involve a fast ZeroLag MA crossing above a slow ZeroLag MA for long positions, and vice versa for short positions, with price position relative to the MA serving as trend confirmation. Exit conditions include reverse crossover signals, fixed stop-loss and take-profit levels, or trailing stops that lock in profits as the trend progresses. Position sizing supports both fixed lot sizes and adaptive calculation based on account equity or risk percentage. Money management includes maximum position limits and drawdown control mechanisms to prevent excessive risk exposure. The overall strategy emphasizes early trend entry by minimizing indicator lag to improve signal timeliness.

Strengths

  • Zero-lag MA reduces the inherent delay of traditional moving averages, providing more timely entry signals
  • Multi-layer risk control including stop-loss, take-profit, and trailing stop mechanisms
  • Supports adaptive position sizing that dynamically adjusts lot size based on account equity

Weaknesses

  • Zero-lag MA tends to generate frequent false signals in ranging markets, leading to consecutive losses
  • Lacks a market regime filter (e.g., ADX or volatility indicator) to distinguish trending from choppy conditions
  • Fixed trailing stop parameter does not account for market volatility changes, potentially exiting too early during strong moves

Possible improvements

  • Add an ADX or volatility filter to reduce trading frequency in ranging markets and avoid false signals
  • Replace fixed trailing stop with an ATR-based dynamic trailing stop to better adapt exit to market volatility changes
  • Implement multi-timeframe confirmation, allowing entries only when the higher timeframe trend direction aligns

Risk assessment

Overall risk: Medium

  • Lacks market regime filtering, potentially causing frequent entries and consecutive stop-outs in choppy markets
  • Fixed-pip stop-loss does not account for volatility differences across instruments, creating cross-symbol applicability risk

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation4.0
Documentation2.0
Overall2.8

Parameters

ParameterDefaultDescription
ZeroLagMA_Fast_Period20Fast zero-lag MA period
ZeroLagMA_Slow_Period50Slow zero-lag MA period
StopLoss300Stop loss in points
TakeProfit600Take-profit in points (~10 points)
Lots0.1Fixed trading lot size
TrailingStop150Trailing stop in points; 0 to disable
MaxPositions3Maximum simultaneous positions
MagicNumber17114EA magic number for order identification

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.