EA-11213 · Trend Following

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

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsHull Moving Average, LWMA, Custom Signal Line
AuthorCopyright © 2014, Nikolay Kositsin

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Custom indicator approximated
GBPUSD0.00%0.00%0.00%0—————Custom indicator approximated
USDJPY0.00%0.00%0.00%0—————Custom indicator approximated
XAUUSD0.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

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness3.0
Innovation2.0
Documentation1.0
Overall2.5

Parameters

ParameterDefaultDescription
MM0.1Money management ratio parameter
MMModeLOTLot calculation mode (Free Margin/Balance/Net Margin Loss/Net Balance Loss/Fixed Lot)
StopLoss_1000Stop Loss in points
TakeProfit_2000Take Profit in points
Deviation_10Maximum allowed slippage
BuyPosOpentrueAllow buy position opening
SellPosOpentrueAllow sell position opening
BuyPosClosetrueAllow buy position closing
SellPosClosetrueAllow sell position closing
InpInd_TimeframePERIOD_H4Indicator timeframe
XLength20Hull MA period length
IPCPRICE_CLOSEApplied price type
XMA_MethodMODE_LWMASmoothing method (SMA/EMA/SMMA/LWMA/JJMA/JurX/ParMA/T3/VIDYA/AMA)
XPhase15Smoothing phase parameter (JJMA range -100 to +100)
SignalBar1Signal detection bar index

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.