Simplest Hedging EA
This EA implements a straightforward hedging strategy by opening an opposite-direction trade whenever an existing position moves into loss by a predefined amount. It aims to neutralize drawdown by covering the losing position with a counter-trade, then closes both when the net profit reaches a target. The logic is minimalistic — no indicators, just pure position-based hedging.
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 strategy concept is loss-triggered hedging: when an existing position's floating loss exceeds a predefined threshold (InPips), the EA automatically opens an opposite-direction trade to hedge the risk exposure. Entry conditions are purely based on floating loss exceeding InPips — no technical indicators or market analysis is involved, just position P&L status. Exit conditions trigger when the hedged pair's combined net profit reaches the TakeProfit target, at which point both positions are closed simultaneously. Position sizing for the hedge order typically mirrors the original lot size or applies a multiplier, but there is no adaptive sizing mechanism based on account equity or volatility. Money management is weak — there is no maximum drawdown limit or account equity protection, and sustained adverse moves can cause repeated hedging layers that eventually exhaust margin. The overall strategy lacks trend awareness and hard stop-loss protection, risking a vicious spiral of multiple hedge layers in trending markets.
Strengths
- Extremely simple logic that is easy to read and maintain, suitable for beginners learning hedging concepts
- Can effectively reduce unilateral floating loss in ranging markets, providing some protection
- Net exposure is reduced after hedging, keeping short-term account drawdown under control
Weaknesses
- No stop-loss; in a trending market, unlimited hedging layers can lead to margin call
- Lacks technical indicator analysis — entry is purely loss-triggered with no timing optimization
- No maximum hedge layer limit or account equity protection, making money management inadequate
Possible improvements
- Add maximum hedge layer limits and account maximum drawdown protection
- Incorporate technical indicator filters to avoid blind hedging during strong trends
- Implement dynamic position sizing based on account equity and market volatility
Risk assessment
Overall risk: High risk
- No stop-loss protection; repeated hedging in trending markets can lead to margin call
- No account equity or maximum drawdown limits, leaving capital safety unguaranteed
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
InPips | unspecified | Floating loss threshold in points to trigger hedge |
TakeProfit | unspecified | Hedge pair net profit target in points |
Lots | unspecified | Hedge order lot size |
Similar Hedging EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.