Auto Recovery MT5/MT4 EA
![](https://robotfx.org/wp-content/uploads/2023/06/ar.webp)
![](https://robotfx.org/wp-content/uploads/2023/06/hedging-example.png)
![](https://robotfx.org/wp-content/uploads/2023/06/auto-recovery-settings.png)
![](https://robotfx.org/wp-content/uploads/2023/06/hedging-forex-trades.png)
Auto Recovery MT5/MT4 EA
Auto Recovery is a Metatrader hedging expert advisor that can hedge an opened trade, therefore preventing any possible losses. The EA uses a strategy known as zone recovery, automatic loss recovery or recovery zone and may be able to recover the losses from a previous negative trade and it is compatible with both MT4 and MT5
Auto Recovery main functions
- prevent losses by hedging opened trades, rather than using a stoploss
- close trading basket when profit reaches breakeven or a certain amount
- close losing trades and place stoploss for the winners, changing losers into winners
RobotFX Auto Recovery is a Metatrader 5 / Metatrader 4 expert advisor designed to recover the loss of a losing trade by opening an opposite trade, or more, if it’s the case. If you are familiar with, this is one of the trade management part of the RobotFX Fluid EA, with less features (basically the HedgeZone). A very simple but effective way to hedge a losing trade so it will close in profit, at least at break-even. The automatic loss recovery algorithm used by this MT4 recovery zone EA is far better than using a stoploss and incomparable to a martingale trading strategy. This MT4 EA has been inspired by Joseph Nemeth’s “zone recovery” trading strategy.
Check the picture below to understand how zone recovery trading works in forex hedging. The lotsize of the hedging orders (opposite pending order) is determined by a multiplier set by the trader, or by the recovery zone ratio with the take profit.
The pending (hedging) orders’ lot size is calculated so that the profit will always increase (if the price hits them and continues further).
Trade examples
![How hedging when trading forex recovers losses and brings profits](https://i0.wp.com/robotfx.org/wp-content/uploads/2023/06/hedging-example-1024x449.png?resize=1020%2C447)
In the trading chart above, the EA is set to close all the opened trades when their profits reach $0 (profit breakeven). As seen, as soon as a trade is opened, an opposite pending order of a bigger lotsize is placed. When the price triggers the hedging pending order and then goes in its favour, the profits from the hedge trade overcome the 1st trade losses. At that moment the expert starts closing all opened orders and deleted the remaining hedging orders from the chart.When reaching the profit breakeven, Auto Recovery EA can be set to close only the losing orders and continue trailing the (opposite) profitable trades, therefore transforming losers into winners; we advise traders to download it and find the best hedging settings for their trading strategy.
Auto Recovery Settings
![Shows the hedging expert advisor settings](https://i0.wp.com/robotfx.org/wp-content/uploads/2023/06/auto-recovery-settings.png?resize=792%2C716)
- Client Email – fill this with your email IF you are using a paid version of this EA on a LIVE account
- Recovery Zone – the number of pips from the opened trade where you want the hedge order to be placed; technically it is the height of the recovery zone
- Take Profit has 2 functions:
- Normal take profit for the opened trades, if Close Trades At Take Profit is set to true and the real profit is bigger than Minimum Profit
- The ratio between this and the Recovery Zone can be used to calculate the next recovery trade order lotsize ( Use Hedge Multiplier must be set to false). A ratio of 1:1 (for example RecoveryZone 50, TakeProfit 50) will make the hedging order to be double the size of the previous/initial order
- Hedge Multiplier – IF Use Hedge Multiplier is set to true, this is the multiplier used to calculate the size of the next hedging order, based on the previous one(s)
- Hedge Last Order LotSize – if enabled, it will set the hedging lotsize based on the last order lotsize instead of considering the entire baskets of opposite trades
- Maximum Orders – the maximum number of recovery trades allowed to be opened by the EA; use as a safety measure to restrict the EA opening too many trades, such as when a consolidation zone occurs
- Minimum Profit – minimum profit which, once reached, allows the EA to close a basket of trades (see Close All Opened Trades) or a trade at Take Profit level (although at this point the profit should already be higher than Minimum Profit)
- BreakEven – once the price will move in your favor this number of pips (away from the opening price), the EA will set the stoploss at the trade opening price
- Use Hedge Multiplier – whether or not to use a lotsize multiplier for the hedging orders, instead of the ratio between the Recovery Zone and the Take Profit
- Hedge Multiplier – the lotsize multiplier for the hedge orders, if the Use Hedge Multiplier is set to true
- When Minimum Profit is Reached – choose what to do when the basket profit reaches the Minimum Profit:
- Close All Opened Trades – once this profit is reached, the EA will start closing all opened trades on the chart. Set it to 0 if you want to close all trades at a cumulative break-even; however, please mind that between closing the first trade and the last one, the price might move and the profit (after close) might be slightly higher or lower than the MinProfit
- Close Losers & Set BreakEven – close the losing trades and place the stop-loss of the winning trades at a distance defined by the trader (see below)
- Do Nothing – self explanatory
- Trailing Stop for Close Losers & Set BE (pips) – if #2 is triggered (above), this will be the trailing-stop for the remaining (winners) opened trades
- Trailing Step for Close Losers & Set BE (pips) – if #2 is triggered (above), this will be the trailing-step for the remaining (winners) opened trades. Also, it defines the distance from the current price where the EA will place the stoploss (right after Close Losers & Set BreakEven will close the losing trades)
- Close Trades At Take Profit – close trades at Take Profit, if they are all profitable (ie profit > Minimum Profit)
- Close Trades At Maximum Orders – whether or not to allow the EA to close all orders when the Maximum Orders number is reached – will probably lead to some losses as the EA won’t consider the profit and the Minimum Profit
- Slippage – the maximum distance, in pips, allowed for the price to move between sending a trade order to the server and execution (by the broker’s server)
- Magic Number – leave this to -1 to trade manually (ie use the EA to hedge your personal trade) or set to match the Magic Number of your other EAs (if you want the Auto Recovery to manage trades opened by other experts)
- Trade Comment – use this to add a comment to the loss recovery trades opened by this EA, so you can monitor the logs easily
- Show Comments – displays information about the broker/trade(r)/basket on the chart
- Open Trade If Pending Hedge Fails – if a hedge order is not triggered and the price “jumps” over it (example: gaps formed during the weekend) the EA will open a hedging trade and recalculate the recovery zone, the (other) opposite order etc.
- LotSize (testing) – applies only when testing the EA in the Strategy Tester and it defines the lotsize of the opened (first) random trade, as percentage of the entire equity (ie 0.01 = 1%, 0.1 = 10%, 1 = 100%)
How to choose hedging settings
Differences between MT5 EA version compared to MT4 EA
- has an option to disable BreakEven – the BreakEven (pips) value will still be used if Close Losers & Set BreakEven for Winners is an option to deal with baskets of trades that reach Minimum Profit
- had the trailing option for Close Losers & Set BreakEven for Winners removed (the MT5 version places the StopLoss at BE without trailing the price)
- has the option to close all trades if their (negative) profits reach the Maximum Loss amount
- offers the posibility to remove itself from the chart, close MT5 or do nothing if any of the Close Trades When/If is triggered according to trader’s settings
Watch the RobotFX Auto Recovery zone recovery strategy