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
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 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.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
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio controlling risk per trade |
MMMode | LOT | Lot mode: free margin/balance/margin w/ floating P&L/balance w/ floating P&L/fixed lot |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Max allowed price deviation (slippage) in points |
BuyPosOpen | true | Allow opening long positions |
SellPosOpen | true | Allow opening short positions |
BuyPosClose | true | Allow closing long positions |
SellPosClose | true | Allow closing short positions |
InpInd_Timeframe | PERIOD_H4 | HighsLowsSignal indicator timeframe |
HowManyCandles | 3 | Number of bars to determine directional price change |
SignalBar | 1 | Bar index for entry signal |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.