Exp_HullTrend
This EA trades based on the HullTrend custom indicator, which uses a Hull Moving Average to determine trend direction. It opens buy positions when the indicator line crosses above the signal line and sell positions when it crosses below, with configurable stop loss and take profit levels. The EA includes money management options and separate controls for opening and closing positions on each side.
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 | — | — | — | — | — | Custom indicator approximated |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Custom indicator approximated |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Custom indicator approximated |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Custom indicator approximated |
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 Hull Moving Average trend following, where Hull MA reduces lag by using a square-root period of weighted moving averages, making it more responsive to trend reversals. Entry conditions are: a buy signal (BUY_Open) triggers when the indicator line Ind crosses above the signal line Sign, and a sell signal (SELL_Open) triggers when Ind crosses below Sign, requiring a relationship change between two consecutive bars for crossover confirmation. Exit conditions include: closing positions on trend reversal signals (BUY_Close/SELL_Close), plus fixed stop loss (StopLoss_=1000 points) and take profit (TakeProfit_=2000 points). Position sizing is controlled by the MM parameter with the MMMode enumeration supporting five modes: free margin, balance, loss-free margin, loss balance, and fixed lot. Money management integrates the TradeAlgorithms.mqh library's standardized functions providing multiple capital allocation calculation methods. The EA detects signals only on new bar openings to avoid per-tick repeated trading, using the IsNewBar mechanism for signal refresh.
Strengths
- Hull MA-based trend following has lower lag, responding more quickly to trend changes
- Provides 5 money management modes and flexible position sizing for different risk preferences
- Independent on/off controls for buy/sell opening and closing offer high configuration flexibility
- New bar detection mechanism prevents per-tick repeated trading, reducing unnecessary operations
- Complete stop loss/take profit setup with slippage control provides basic risk management
Weaknesses
- Fixed SL/TP of 1000/2000 points ignores market volatility (ATR), may be unsuitable across instruments and timeframes
- Lacks trend filter mechanism, may generate frequent false crossover signals in ranging markets causing consecutive losses
- No trailing stop feature, profitable positions may give back significant profits on trend pullbacks
- Depends on custom HullTrend indicator; EA fails if indicator file is missing, reducing portability
- No check for existing positions in the same direction, potentially opening duplicate positions
Possible improvements
- Add ATR-based dynamic SL/TP to automatically adjust stop distances based on market volatility
- Add trend strength filter (e.g., ADX) or higher timeframe trend confirmation to reduce false signals in ranging markets
- Add trailing stop functionality to protect profits during trend continuation
- Add same-direction position check to prevent duplicate entries that increase risk exposure
Risk assessment
Overall risk: Medium
- Fixed SL/TP not adapted to different market volatility environments; stop loss may be too small on volatile instruments
- Lacks ranging market filter, may cause frequent whipsaw entries and consecutive losses in sideways markets
- No existing same-direction position check, risking 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 Loss/Net Balance Loss/Fixed Lot) |
StopLoss_ | 1000 | Stop Loss in points |
TakeProfit_ | 2000 | Take Profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Allow buy position opening |
SellPosOpen | true | Allow sell position opening |
BuyPosClose | true | Allow buy position closing |
SellPosClose | true | Allow sell position closing |
InpInd_Timeframe | PERIOD_H4 | Indicator timeframe |
XLength | 20 | Hull MA period length |
IPC | PRICE_CLOSE | Applied price type |
XMA_Method | MODE_LWMA | Smoothing method (SMA/EMA/SMMA/LWMA/JJMA/JurX/ParMA/T3/VIDYA/AMA) |
XPhase | 15 | Smoothing phase parameter (JJMA range -100 to +100) |
SignalBar | 1 | Signal detection bar index |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.