Hedger
Hedger is an Expert Advisor that implements a hedging strategy by opening opposing positions to protect existing trades from adverse market movements. It monitors open positions and dynamically creates hedge orders when certain loss thresholds or market conditions are met, aiming to limit downside risk through correlated offsetting trades. The EA manages both the original and hedge positions with configurable parameters for hedge triggers and exit logic.
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
- Has no stop loss or trailing stop
On its own this is not a typical blow-up pattern, 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 the Hedger EA is hedging, which automatically opens opposing positions when existing positions accumulate floating losses beyond a preset threshold. Entry conditions are triggered based on the floating loss amount or percentage of the open position, and when the threshold is exceeded, the EA opens a hedge position in the opposite direction or on a correlated instrument. Exit conditions typically involve closing the hedge position when it reaches a profit target or when the original position's risk is mitigated, sometimes closing both simultaneously. Position sizing for the hedge can be proportional to the original position or configured via user-defined parameters to control the hedge ratio. Money management relies on hedge ratio settings and maximum hedge count limits to control overall exposure. The strategy effectively limits directional risk but carries the danger that hedge positions can also accumulate losses, and in choppy markets both sides may lose.
Strengths
- Effectively limits downside risk of directional positions, providing systematic risk protection
- Automated hedging mechanism avoids human delay and responds quickly to adverse moves
- Configurable hedge parameters offer flexibility to adapt to different market conditions
- Hedge positions have independent profit targets and exit logic, not fully dependent on original positions
Weaknesses
- In choppy markets, both original and hedge positions can incur losses simultaneously
- Frequent hedging increases trading costs (spreads and commissions), potentially eroding profits
- Hedging does not generate net profit but is purely a risk management tool, potentially masking underlying strategy flaws
- If correlation between hedged instruments suddenly changes, hedge effectiveness can be significantly reduced
Possible improvements
- Add volatility-based (ATR) dynamic hedge trigger thresholds instead of fixed percentages to adapt to different market volatility regimes
- Introduce correlation monitoring mechanism that auto-adjusts hedge ratios or pauses hedging when instrument correlation weakens
Risk assessment
Overall risk: Medium
- Dual-sided positions can simultaneously generate losses in extreme market conditions, increasing total account exposure
- Lack of hard cap verification on hedge count could lead to over-hedging and insufficient margin
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
HedgeTriggerPercent | 5 | Floating loss percentage threshold to trigger hedge |
HedgeLotRatio | 1.0 | Hedge lot to original lot ratio |
MaxHedgeCount | 3 | Maximum hedge count limit |
HedgeProfitTarget | 10 | Hedge position profit target in points |
MagicNumber | 12345 | EA magic number; 0 monitors all orders |
CloseHedgeWithOriginal | true | Close hedge together with original position |
Similar Hedging EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.