EA-23344 · Trend Following

VHF EA

This EA uses the Vertical Horizontal Filter (VHF) indicator to determine whether the market is in a trending or ranging phase, then executes trend-following trades when a trend is detected. It opens positions in the direction of the prevailing trend and uses the VHF reading as a filter to avoid trading in choppy, directionless markets. The EA is designed for medium-to-longer timeframe trend capture.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4, D1
IndicatorsVHF, MA
AuthorCopyright © 2018, Vladimir Karputov

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.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 VHF EA is based on the Vertical Horizontal Filter (VHF) indicator, which measures trend strength by comparing the total price range to the net price movement over a given period. When the VHF value rises, it signals that the market is trending, and the EA opens positions in the direction of the prevailing trend. When VHF is low, it indicates a ranging or choppy market, and the EA avoids entering trades or exits existing positions. Entry conditions typically involve the VHF reading exceeding a threshold level combined with a directional price movement confirmation. Exit conditions may include VHF falling below the threshold, fixed stop-loss and take-profit levels, or trend reversal signals. Position sizing generally uses fixed lots or a simple account-balance-based proportion, while money management relies on the VHF filter to reduce false signals during ranging periods, though it lacks explicit risk-percentage calculation or dynamic position sizing modules.

Strengths

  • The VHF indicator effectively distinguishes trending from ranging markets, reducing false signals
  • The strategy logic is simple and clear, making it easy to understand and optimize parameters
  • Trend-following strategies perform well in strong trending markets with favorable risk-reward ratios
  • Avoiding frequent trades in choppy markets reduces transaction costs and equity erosion

Weaknesses

  • VHF is a lagging indicator, causing delayed trend identification that may miss early trend phases
  • Lacks dynamic stop-loss and trailing stop mechanisms to effectively protect accumulated profits
  • Fixed lot or simple proportional sizing lacks sophisticated money management
  • VHF signals are unstable during trend transitions, potentially causing consecutive losses

Possible improvements

  • Add a trailing stop mechanism to lock in trend profits and prevent givebacks
  • Combine with additional trend confirmation indicators (e.g., ADX or MA crossover) to improve entry signal reliability

Risk assessment

Overall risk: Medium

  • VHF lagging nature may cause entries at trend end stages, increasing loss probability
  • Fixed stop-loss may not suit all market volatility conditions and should adapt to ATR
  • Lacks maximum drawdown control and consecutive loss protection mechanisms

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.3

Parameters

ParameterDefaultDescription
VHF_Period28VHF indicator calculation period
VHF_Threshold0.4VHF trend determination threshold
LotSize0.1Lot size per trade
StopLoss500Stop loss in points
TakeProfit1000Take profit in points
TimeframeH1Trading timeframe

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.