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
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | -3.81% | -3.32% | 5.01% | 115 | 51.80% | — | — | — | — | Same as other EAs |
| GBPUSD | -2.36% | -2.06% | 5.91% | 115 | 44.30% | — | — | — | — | Same as other EAs |
| USDJPY | -0.54% | -0.47% | 5.96% | 114 | 49.60% | — | — | — | — | Same as other EAs |
| XAUUSD | +128.54% | +97.96% | 23.57% | 111 | 52.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
Parameters
| Parameter | Default | Description |
|---|---|---|
InpLossForOpposite | 500 | Floating loss threshold in points to trigger hedge |
LotMultiplier | 1.5 | Hedge position lot multiplier |
MaxOppositeTrades | 3 | Maximum number of hedge trades allowed |
MagicNumber | 123456 | Unique EA order identifier preventing conflicts |
Slippage | 10 | Maximum allowed slippage |
InpStopLoss | 0 | Hedge position stop loss in points; 0=disabled |
InpTakeProfit | 0 | Hedge position take profit in points; 0=disabled |
Similar Hedging EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.