Exp_ColorZerolagX10MA
This EA trades based on the ColorZerolagX10MA custom indicator, which is a zero-lag composite moving average built from 10 differently-perioded smoothing lines with weighted factors. It opens buy positions when the indicator turns upward and sell positions when it turns downward, with configurable buy/sell open and close toggles. Position sizing and trade execution are handled through the TradeAlgorithms library with multiple money management modes.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
Not backtested yet — this EA could not be converted automatically.
Strategy analysis
The strategy core is a trend following system based on the Zero-Lag X10 Moving Average (ColorZerolagX10MA). Entry conditions: a buy signal triggers when the indicator turns upward (Value[0]>Value[1] and Value[1]<Value[2]), and a sell signal triggers when it turns downward (Value[0]<Value[1] and Value[1]>Value[2]). Exit conditions are controlled by fixed StopLoss and TakeProfit parameters, while the system also supports counter-direction closing (close sell positions on buy signals and vice versa). Position sizing supports five modes: fixed lot (LOT), balance-based, equity-based, free margin-based, and loss-adjusted free margin-based. The money management parameter MM controls the risk ratio with a default of 0.1. The strategy combines 10 smoothing lines with different periods (3 to 23) weighted by Factor parameters, then applies an additional smoothing layer (Smooth) for signal filtering, significantly reducing lag compared to traditional moving averages.
Strengths
- The zero-lag moving average design effectively reduces traditional MA delay through a weighted combination of 10 smoothing lines
- Independent buy/sell open/close controls provide high strategy flexibility, allowing each trade direction to be enabled or disabled individually
- Supports 5 position sizing modes, accommodating traders with different risk preferences
- Uses new bar detection (IsNewBar) to prevent repeated trading within the same bar
- Multi-layer smoothing filtration (10 MAs + additional Smooth layer) effectively reduces false signals
Weaknesses
- Excessive parameters (10 Lengths + 10 Factors + others) create large optimization space prone to overfitting historical data
- Fixed StopLoss of 1000 points and TakeProfit of 2000 points may not suit all instruments and market conditions
- Lacks trend filtering mechanism, potentially generating frequent false signals in ranging markets leading to consecutive losses
- No spread/slippage filter, trading costs on high-spread instruments may erode profits
- SignalBar defaults to 1, meaning signals have a one-bar delay that may miss optimal entry timing
Possible improvements
- Add ATR-based dynamic stop-loss and take-profit instead of fixed points, making the strategy adaptive to different instrument volatilities
- Add a trend strength filter (e.g., ADX or higher timeframe MA direction) to avoid frequent trading in ranging markets
- Add spread/slippage filtering to pause trading when spread exceeds a threshold
Risk assessment
Overall risk: Medium
- No spread filter mechanism, unfavorable fills possible in high-spread environments
- Fixed stop-loss and take-profit do not adapt to volatility characteristics of all instruments
- Multi-parameter system carries overfitting risk, backtest performance may not be reproducible
- No check for existing positions in the same direction, potentially leading to duplicate position opening
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio parameter |
MMMode | LOT | Lot calculation mode (Free Margin/Balance/Net Margin/Net Balance/Fixed Lot) |
StopLoss_ | 1000 | Stop Loss in points |
TakeProfit_ | 2000 | Take Profit in points |
Deviation_ | 10 | Maximum slippage deviation |
BuyPosOpen | true | Allow opening long positions |
SellPosOpen | true | Allow opening short positions |
BuyPosClose | true | Allow closing long positions |
SellPosClose | true | Allow closing short positions |
InpInd_Timeframe | PERIOD_H4 | Indicator calculation timeframe |
XMA_Method | MODE_JJMA | MA smoothing method |
Length1-10 | 3/5/7/9/11/13/15/17/21/23 | Period lengths for each of the 10 MAs |
Factor1-10 | 0.1 | Weighting factors for each of the 10 MAs |
XPhase | 15 | MA phase parameter (JJMA range -100 to +100) |
SmoothMethod | MODE_SMA | Signal smoothing method |
Smooth | 3 | Signal smoothing period |
SmoothPhase | 15 | Signal smoothing phase parameter |
IPC | PRICE_CLOSE | Applied price type |
SignalBar | 1 | Bar index for signal calculation |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.