Home / Coding / Expert Advisors / Hedge Zone Recovery

Hedge Zone Recovery

Opens one trade on a trend condition, then hedges with a capped number of opposite legs if price breaks the zone.

DRF_Hedge_Zone_Recovery_EA · version 2.01 · Strategy · MetaTrader 5

€15   Buy Hedge Zone Recovery →

Or get every Expert Advisor, for life, for €150: see the bundle.

Risk. This Expert Advisor uses a method that can look steady for a long time and then produce a large loss. Trading carries a high level of risk and you can lose more than you expected. No result is promised. Read the Risk Disclosure.

Test it on a demo account first. When everything works as you expect, use it on a real account.

It works on any symbol: point-based inputs scale to the symbol you attach it to.

Who it suits

Experienced traders who study recovery systems and accept that each added leg adds risk.

What it does

A recovery system with a hard cap on legs. It opens a single initial order, defines a recovery zone around the average entry and, if price breaks the zone against the net position, opens the opposite leg with a lot sized to help recover the loss.

How it works

  1. Initial order on a simple trend condition.
  2. Recovery zone around the average entry; a break against the net position opens the opposite leg.
  3. A hard cap on legs, so it cannot turn into an uncapped grid.
  4. Exit: a basket cash target with trailing on the whole set.
  5. Filters: session 03:00 to 21:00, spread cap 350 points, calendar news filter.

What is included

What is not included

What you need

How to try it

  1. Attach it to a demo chart on the timeframe you want to test.
  2. Set a small lot size (0.01) and leave the other inputs at their defaults.
  3. Read the Experts and Journal tabs and the on-chart panel for the reasons it gives when it skips an entry.
  4. Move to a small live account only after you have seen it behave as expected on demo.

Results

No results are published for this Expert Advisor, and none are implied. Test it on a demo account first. Past results never promise future ones.

Buy once, keep it for life

€15   Buy Hedge Zone Recovery →

Manual: every setting in plain language

Enter your DRF Key in the key input. The group "Any-asset scaling" controls how point inputs follow the symbol.

Donaldson R F Licence

InpLicenceKey (default: (empty))
Licence key

Identification

InpMagicNumber (default: 770002)
Magic number (different from the grid EA)
InpTradeComment (default: DRFHedge)
Text written in the comment field of each order.

Initial entry trigger

InpFastMA (default: 20)
Period of the fast moving average.
InpSlowMA (default: 50)
Period of the slow moving average.
InpADX_Period (default: 14)
ADX period (trend strength).
InpADX_MinToEnter (default: 20.0)
Requires a minimum directional strength to open the first leg

Recovery zone

InpATR_Period (default: 14)
Number of bars in the Average True Range (ATR).
InpZoneWidthATRMult (default: 1.5)
Zone width = ATR x this factor
InpInitialLot (default: 0.01)
Order size in lots for the first order of a series.
InpLegLotMultiplier (default: 1.8)
Lot factor of each new leg over the previous one
InpMaxLegs (default: 4)
Hard cap on legs (never let it grow unchecked)

Basket management (smart exit)

InpBasketTargetUSD (default: 12.0)
Cash target for the whole basket of orders, in account currency.
InpTrailingStartUSD (default: 12.0)
Basket gain at which trailing starts, in account currency.
InpTrailingStepUSD (default: 5.0)
Step of the basket trailing, in account currency.
InpMaxBasketLossUSD (default: 100.0)
Defensive hard stop for the basket

News filter (native MT5 calendar)

InpUseNewsFilter (default: true)
Pause new entries around scheduled news, using the MetaTrader 5 economic calendar.
InpNewsMinutesBefore (default: 30)
How many minutes before a qualifying news release new entries are blocked.
InpNewsMinutesAfter (default: 30)
How many minutes after a qualifying news release new entries stay blocked.
InpNewsMinImportance (default: CALENDAR_IMPORTANCE_HIGH)
The lowest calendar importance that counts as news for the filter (high, medium or low).
InpCloseOnAdverseNews (default: true)
Close the basket when adverse news arrives while it is losing.
InpAdverseNewsMaxLossUSD (default: 30.0)
Basket loss, in account currency, at which the defensive close applies.

Spread filter

InpUseSpreadFilter (default: true)
Switch the spread filter on or off.
InpMaxSpreadPoints (default: 350)
Maximum spread, in points, to allow opening/adding legs

Session filter

InpUseSessionFilter (default: false)
Switch the trading-hours filter on or off.
InpSessionStartHour (default: 3)
First hour of the day (server time) in which new entries are allowed.
InpSessionEndHour (default: 21)
Hour of the day (server time) at which new entries stop.

Any-asset scaling

InpAutoScalePoints (default: true)
Scale point-based inputs to this symbol's volatility (default values are tuned for a ~3000-point daily range) Leave on unless you know the symbol is much calmer or wilder than the usual daily range.

Related Expert Advisors

Risk Management

An overlay that closes positions when your daily or session loss limit is reached.

Open →

Trend Pullback

Buys dips in an uptrend and sells rallies in a downtrend, using AO and ADX for the trend and an envelope for the entry.

Open →

Frequently Asked Questions

How many legs can it open?
A fixed number set by an input; the cap exists so it cannot grow without limit.
What is the zone?
A price band around the average entry price; breaking it triggers the next leg.
Is it safer than a grid?
Not necessarily. The cap limits the count, but each leg is sized to recover the loss and so raises exposure.
Do I need a DRF Key to run it?
Yes. The file is free to download, but the EA checks a DRF Key against the licence server when it starts and then every hour. Plans and prices are on the DRF Key page.
Which provider and account should I use?
Any MetaTrader 5 account that offers the symbol. Test on a demo account first; the source does not tie the EA to one provider.
Does it guarantee a result?
No. Trading carries risk and an EA can lose money. The project holds no published performance figures for this EA, so none are shown.
Which symbols does it work on?
Any symbol your provider offers. Inputs that are measured in points scale automatically to the symbol's usual daily range, so the same preset behaves sensibly on a forex pair, an index or Bitcoin. Always test on a demo account first.
Do I need a key to run it?
Yes. After you buy, you receive a DRF Key. It works for life and on up to 5 internet addresses at the same time.
Is there a subscription?
No. You pay once and keep it for life, with free updates.
Does it promise a result?
No. Read the Risk Disclosure. Test on a demo account first; when everything works as you expect, use it on a real account.

Get Expert Advisor and coding news

New Expert Advisors, updates, price changes and videos, by e-mail. A short e-mail only when something is really new. One click to unsubscribe.

You get one e-mail to confirm first. By subscribing you agree that I use your address to send this newsletter. See the Privacy Policy.

Protected by Google reCAPTCHA. The Google Privacy Policy and Terms of Service apply.

Running into a technical issue or something that doesn't work right on this page? Please let us know straight away via our Contact page. That is how we find out what is broken and get it fixed.