Exp_ZeroFillingStop
This EA implements a zero-filling stop strategy that opens hedging positions to average the entry price toward the current market price, effectively 'filling' the gap to zero loss. It dynamically manages opposing positions to bring the overall position breakeven, then closes all positions once the net profit reaches zero or a target. The strategy is a form of cost-averaging hedging without traditional stop-loss orders.
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
The strategy concept is based on the zero-filling principle: when existing positions are in floating loss, the EA opens hedging positions in the opposite direction to shift the average entry price closer to the current market price, thereby reducing the floating loss. Entry conditions trigger when the floating loss of existing positions exceeds a certain threshold, at which point the EA automatically opens a hedge order in the opposite direction, using the hedge's profit to offset the original position's loss. Exit conditions are met when the net profit of all positions reaches zero or a preset target, at which point all positions are closed. Position sizing uses a progressive scaling approach, where the size of each hedging position may be dynamically adjusted based on the degree of floating loss. Money management relies on the hedging mechanism rather than traditional stop-losses to control risk, but this can lead to continuous accumulation of positions. The core risk of the overall strategy is that during sustained trending markets, hedging positions also generate floating losses, causing total exposure and risk to expand continuously.
Strengths
- No traditional stop-loss needed; risk is managed through a dynamic hedging mechanism
- Performs well in ranging markets, effectively pulling floating losses back to zero
- Clear strategy logic with a unique approach to cost averaging
Weaknesses
- In sustained trending markets, hedging positions also generate floating losses, causing total risk exposure to expand continuously
- No traditional stop-loss protection; extreme market conditions can lead to severe losses
- Positions can accumulate continuously, requiring high margin and risking margin calls
Possible improvements
- Add a maximum floating loss stop as a last line of defense to prevent account blowout
- Incorporate a trend filter to pause hedging operations or reduce position sizes during strong trending markets
Risk assessment
Overall risk: High risk
- No traditional stop-loss mechanism; risk amplifies infinitely during extreme market conditions
- Hedging positions can accumulate without limit, leading to margin shortage and account blowout risk
- Hedging strategy fails during sustained trending markets, generating floating losses in both directions
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
StopLevel | 0 | Break-even stop trigger level, 0=close at breakeven |
Step | unspecified | Hedging add-on price distance between operations |
LotMultiplier | 1.0 | Lot multiplier for re-opening positions |
MaxPositions | unspecified | Maximum position count to prevent unlimited adding |
MagicNumber | 0 | EA magic number for identifying managed positions |
Similar Hedging EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.