EA-18904 · Hedging

Opposite Trade

This EA opens opposite (hedging) positions against existing trades when a specified drawdown threshold is reached. It acts as a loss recovery mechanism by opening reverse trades with adjustable lot multipliers to hedge against adverse price movement.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryHedging
RiskCaution
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4, D1
IndicatorsNone
AuthorCopyright © 2017, Vladimir Karputov

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-3.81%-3.32%5.01%11551.80%————Same as other EAs
GBPUSD-2.36%-2.06%5.91%11544.30%————Same as other EAs
USDJPY-0.54%-0.47%5.96%11449.60%————Same as other EAs
XAUUSD+128.54%+97.96%23.57%11152.70%————Same as other EAs

On every market this backtest is identical to EA-20679. The automatic conversion almost certainly lost what makes this EA different (a custom indicator, a filter or the money management), so these results are not ranked or counted.

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 hedge recovery: when an existing position's floating loss exceeds a configured threshold, the EA automatically opens an opposite position to hedge. Entry condition is triggered when current position drawdown surpasses the InpLossForOpposite parameter threshold in points or monetary value. Exit conditions depend on the hedge position's profit covering the original position's loss, or manual closure by the user. Position sizing uses an adjustable multiplier coefficient (LotMultiplier) where the hedge position's lot size can exceed the original to accelerate breakeven recovery. Money management includes a maximum hedge count limit to prevent unlimited position opening. However, the strategy is essentially a limited martingale variant and still faces risk in extreme trending markets. Overall, this is a defensive recovery strategy rather than a proactive trading system.

Strengths

  • Provides automatic hedging mechanism to protect account during adverse positions
  • Adjustable lot multiplier offers flexible control over hedge intensity and recovery speed
  • Maximum hedge count limit prevents unlimited position opening and over-exposure
  • Simple operation with intuitive and easy-to-understand parameters
  • Can serve as supplementary protection for existing manual or automated trading

Weaknesses

  • Essentially carries martingale attributes where consecutive hedging can lead to oversized positions
  • Extreme market risk without stop loss protection in place
  • Depends on original position direction correctness; hedging only delays rather than resolves the problem
  • Hedge position losses can lead to dual-direction loss dilemma
  • Does not account for spread and commission costs impact on hedging effectiveness

Possible improvements

  • Add global stop loss and account equity protection mechanism to prevent account blowup in extreme scenarios
  • Introduce trend filter to avoid blind hedging during strong trends and opt for direct stop loss instead
  • Add risk-reward ratio calculation and auto-close logic to close all related positions when hedge target is reached

Risk assessment

Overall risk: Caution

  • Hedging is essentially a martingale variant with escalating risk from consecutive position increases
  • Lack of global stop loss can lead to massive losses in extreme market conditions
  • Improper lot multiplier setting accelerates account depletion
  • Does not consider spread cost erosion effect on high-frequency hedging

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation1.0
Overall2.0

Parameters

ParameterDefaultDescription
InpLossForOpposite500Floating loss threshold in points to trigger hedge
LotMultiplier1.5Hedge position lot multiplier
MaxOppositeTrades3Maximum number of hedge trades allowed
MagicNumber123456Unique EA order identifier preventing conflicts
Slippage10Maximum allowed slippage
InpStopLoss0Hedge position stop loss in points; 0=disabled
InpTakeProfit0Hedge position take profit in points; 0=disabled

Similar Hedging 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.