Exp_ColorZeroLAG_MA
This EA trades based on the ColorZeroLAG_MA indicator, which is a zero-lag moving average composed of two smoothing layers. It opens buy positions when the zero-lag MA turns upward and sell positions when it turns downward, with configurable buy/sell enable switches and separate close-on-reverse logic. Position sizing uses multiple money management modes including fixed lot, balance percentage, and free margin percentage.
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 core strategy of this EA is trend following based on directional changes of the ColorZeroLAG_MA zero-lag moving average. Entry conditions: when Value[1]<Value[2] (MA declining) and Value[0]>Value[1] (latest value reversing upward), a buy position is opened and sell positions are closed; when Value[1]>Value[2] (MA rising) and Value[0]<Value[1] (latest value reversing downward), a sell position is opened and buy positions are closed. Exit conditions rely on reverse signal triggers for closing, along with fixed StopLoss and TakeProfit parameters. Position sizing supports four modes: percentage of free margin, percentage of balance, percentage of free margin minus floating loss, and percentage of balance minus floating loss, plus a fixed lot mode. Money management is controlled by the MM parameter for risk ratio and MMMode for calculation method. The strategy employs a dual-layer zero-lag moving average with a default first layer of SMA period 12 and second layer of JJMA period 5, reducing lag through double smoothing to capture trend reversals earlier.
Strengths
- Dual-layer zero-lag moving average design captures trend reversals earlier than traditional single-layer MAs, reducing signal lag
- Multiple money management modes and flexible buy/sell open/close switches accommodate different risk preferences and trading needs
- New bar detection mechanism (IsNewBar) prevents repeated trades within the same bar, reducing overtrading risk
- Configurable StopLoss and TakeProfit parameters provide a basic risk control framework
- Supports multiple price types and 10 smoothing algorithms, offering flexible strategy parameter tuning
Weaknesses
- Default StopLoss of 1000 points and TakeProfit of 2000 points are excessively large for most instruments, effectively providing no meaningful stop, posing extreme risk
- Lacks spread filter and volatility filter, which may generate false signals and result in unfavorable fills during high volatility or wide spread conditions
- No position count check or duplicate position prevention, potentially opening multiple positions in the same direction leading to overexposure
- Strategy relies solely on a single indicator's turning signal without multi-confirmation, prone to frequent whipsaw trades in ranging markets
- SignalBar defaults to 1 but allows setting to 0, causing signal recalculation on every tick which may produce unstable signals on live quotes
Possible improvements
- Add spread filter and ATR volatility filter to avoid opening positions during wide spreads or extreme market volatility, reducing false signals and slippage losses
- Add position count limits and same-direction duplicate position checks to prevent overexposure risk
- Replace fixed-pip StopLoss/TakeProfit with ATR-based dynamic calculation for better risk adaptation across different market volatility environments
- Add trend strength confirmation (e.g., ADX or volume filter) to reduce frequent false breakout trades in ranging markets
- Add trailing stop functionality to protect profits during trending moves
Risk assessment
Overall risk: Medium
- Default StopLoss of 1000 points is too large to provide effective downside protection on most instruments
- No position count check may lead to repeated same-direction entries causing excessive risk exposure
- When SignalBar=0, signals are recalculated every tick potentially triggering unstable trades without proper confirmation
- No spread filter may result in unfavorable fills in high-spread environments
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management: controls lot size or margin ratio |
MMMode | LOT | Lot calculation mode: fixed lot or margin-based |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage in points |
BuyPosOpen | true | Allow opening buy positions |
SellPosOpen | true | Allow opening sell positions |
BuyPosClose | true | Allow closing buy positions |
SellPosClose | true | Allow closing sell positions |
InpInd_Timeframe | PERIOD_H4 | Indicator calculation timeframe |
MA_Method1 | MODE_SMA | First-level smoothing method |
Length1 | 12 | First-level smoothing period |
Phase1 | 15 | First-level smoothing phase (JJMA range -100 to +100) |
MA_Method2 | MODE_JJMA | Second-level smoothing method |
Length2 | 5 | Second-level smoothing period |
Phase2 | 15 | Second-level smoothing phase parameter |
IPC | PRICE_CLOSE | Applied price type |
SignalBar | 1 | Bar index for trade signal retrieval |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.