Exp_ColorZerolagHLR
This EA trades based on the ColorZerolagHLR oscillator, a zero-lag composite momentum indicator built from five weighted HLR (High-Low Range) components. It opens buy positions when the oscillator crosses upward and sell positions when it crosses downward, with configurable stop-loss and take-profit levels. Trading signals are processed only on new bars to avoid redundant entries.
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 concept is based on the Zero-Lag HLR oscillator, which combines five HLR components with different periods (8, 21, 34, 55, 89) and weights (0.05, 0.10, 0.16, 0.26, 0.43) to eliminate the lag inherent in traditional technical indicators. Entry conditions are classic oscillator crossover: a buy signal is generated when the main oscillator line crosses above the signal line at the specified SignalBar, and a sell signal is generated on the opposite crossover. Exit conditions include reverse crossover signals that trigger position closing (controlled by BuyPosClose and SellPosClose flags), plus fixed stop-loss at 1000 points and take-profit at 2000 points. Position sizing is controlled by the MM parameter, supporting either lot-based or margin-per-lot modes as determined by the MMMode parameter. Money management is delegated to the TradeAlgorithms.mqh library functions (BuyPositionOpen, SellPositionOpen), which encapsulate order execution logic. Signals are only generated when IsNewBar detects a new bar formation, preventing redundant trades within the same bar.
Strengths
- Zero-lag oscillator design with multi-period weighted synthesis reduces the lag problem of traditional indicators
- New bar detection mechanism prevents redundant trades within the same bar, reducing overtrading risk
- Complete buy/sell toggle controls (open and close independently configurable) provide good flexibility
- Fixed stop-loss and take-profit settings make risk quantifiable
- Clear signal logic based on oscillator crossover is easy to understand and backtest
Weaknesses
- Fixed 1000-point stop-loss and 2000-point take-profit are not dynamically adjusted based on market volatility (e.g., ATR), potentially unsuitable across different market conditions
- No spread filter, which may lead to excessive entry costs on high-spread instruments
- Oscillator crossover signals tend to generate frequent false signals in ranging markets, leading to consecutive losses
- Dependency on external TradeAlgorithms.mqh library makes core trade execution logic opaque
- No maximum position count limit or maximum drawdown protection, lacking an overall risk control framework
Possible improvements
- Add ATR-based dynamic stop-loss and take-profit mechanism to automatically adjust distances based on market volatility
- Add trend filter conditions (e.g., moving average direction or higher timeframe trend assessment) to reduce false signals in ranging markets
- Add spread filter and maximum position/drawdown protection mechanisms to enhance overall risk management
Risk assessment
Overall risk: Medium
- Fixed 1000-point stop-loss may be too large for low-volatility instruments and too small for high-volatility ones
- No spread filter may lead to unfavorable entries in high-spread environments
- Frequent crossover signals in ranging markets may cause consecutive stop-loss hits
- No limit on maximum simultaneous positions may lead to excessive exposure in extreme conditions
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Lot size: equity percentage or fixed lots |
MMMode | LOT | Lot calc mode: Free margin/Balance/Margin minus floating loss/Balance minus floating loss/Fixed lots |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
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 | Timeframe for indicator calculation |
SignalBar | 1 | Bar index for signal crossover detection |
smoothing | 15 | Oscillator smoothing period |
Factor1 | 0.05 | Weight factor for 1st HLR component |
HLR_period1 | 8 | Period of 1st HLR component |
Factor2 | 0.10 | Weight factor for 2nd HLR component |
HLR_period2 | 21 | Period of 2nd HLR component |
Factor3 | 0.16 | Weight factor for 3rd HLR component |
HLR_period3 | 34 | Period of 3rd HLR component |
Factor4 | 0.26 | Weight factor for 4th HLR component |
HLR_period4 | 55 | Period of 4th HLR component |
Factor5 | 0.43 | Weight factor for 5th HLR component |
HLR_period5 | 89 | Period of 5th HLR component |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.