EA-2314 · Trend Following

Exp_HighsLowsSignal

This EA trades based on signals from the custom HighsLowsSignal indicator, which identifies directional price moves over a configurable number of candles. It opens buy positions on bullish signals and sell positions on bearish signals, with optional position closing on opposite signals. Lot sizing and risk management are handled via the included TradeAlgorithms library.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsHighsLowsSignal
AuthorCopyright © 2014, Nikolay Kositsin

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

Strategy concept: This EA uses the HighsLowsSignal indicator to detect directional price movement over a configurable number of consecutive candles, representing a classic trend-following approach. Entry conditions: A buy signal is generated when the indicator's upper buffer (buffer 1) outputs a non-zero, non-EMPTY_VALUE on the specified signal bar; a sell signal is generated when the lower buffer (buffer 0) outputs a valid value. Exit conditions: The EA supports fixed StopLoss and TakeProfit exits in points, and optionally closes positions on opposite signals when BuyPosClose/SellPosClose permissions are enabled. It also scans historical bars to find the most recent opposite signal as an additional closing trigger for position direction determination. Position sizing: The MM parameter controls the share of deposit per trade, supporting multiple margin modes including free margin, balance, loss-proportion-based sizing, and fixed lot mode (default). Money management: Trade execution relies on the TradeAlgorithms.mqh library functions (BuyPositionOpen/SellPositionOpen) which incorporate a maximum price deviation (Deviation) parameter for slippage control. The strategy employs an IsNewBar mechanism to ensure signals are calculated only once per bar, preventing redundant trade attempts within the same candle.

Strengths

  • Uses IsNewBar mechanism to prevent redundant trades within the same candle, reducing unnecessary trading frequency
  • Provides flexible money management modes supporting both fixed lot and margin-proportion-based sizing
  • Explicit StopLoss and TakeProfit parameters provide basic risk control assurance
  • Buy/sell open and close permissions can be independently controlled, offering high configuration flexibility
  • Opposite signal closing mechanism provides additional protection against trend reversals

Weaknesses

  • Depends on external HighsLowsSignal custom indicator; EA cannot run if the indicator file is missing
  • Lacks protection logic when StopLoss/TakeProfit is set to 0, potentially leading to unlimited losses
  • The loop scanning historical bars for opposite signals has no upper bound protection, potentially impacting performance
  • Does not account for spread and transaction costs' impact on strategy profitability
  • The special logic branch when SignalBar=0 may cause unstable real-time signals

Possible improvements

  • Add validation to prevent trading when StopLoss/TakeProfit is zero, avoiding unintended unprotected positions
  • Add a maximum iteration limit to the historical bar scanning loop to prevent performance issues
  • Add a spread filter to avoid opening positions during high-spread periods

Risk assessment

Overall risk: Medium

  • No protection when StopLoss/TakeProfit is set to 0, potentially leading to unlimited losses
  • Depends on external indicator file; initialization failure lacks user-friendly error messaging
  • No upper bound on historical bar scanning loop, potentially causing delays in extreme cases

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
MM0.1Money management ratio controlling risk per trade
MMModeLOTLot mode: free margin/balance/margin w/ floating P&L/balance w/ floating P&L/fixed lot
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Max allowed price deviation (slippage) in points
BuyPosOpentrueAllow opening long positions
SellPosOpentrueAllow opening short positions
BuyPosClosetrueAllow closing long positions
SellPosClosetrueAllow closing short positions
InpInd_TimeframePERIOD_H4HighsLowsSignal indicator timeframe
HowManyCandles3Number of bars to determine directional price change
SignalBar1Bar index for entry signal

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.