AW Recovery - Instructions and Description

AW Recovery - Instructions and Description

7 October 2026, 10:36
AW Trading Software Limited
0
419

The Expert Advisor is a system designed to recover losing positions. The author's algorithm locks the losing position, splits it into many separate parts and closes each of them separately. It is closing losses in parts that makes it possible to reduce losses with a smaller load on the deposit, which makes working with losses safer than strategies that close orders only in whole groups.

AW Recovery is not a multi-currency EA. To work with different instruments, run AW Recovery in separate windows on each instrument you need. AW Recovery works on any instruments (currencies, indices, oil, metals, stocks).

MT5 version -> HERE / MT4 version -> HERE / All AW products -> HERE

In this article you will find out what the product's strategy is, how to set it up correctly and how to test a drawdown.

THE MOST IMPORTANT THING BEFORE LAUNCHING AW RECOVERY

Before testing and launching on an account, I recommend setting up the four main variables. Please do not leave them at their default values without a calculation for your situation: each variable is calculated for your symbol, timeframe, deposit and the volume of open losing positions.

  1. "Part to close from a loss-making position" - the part of the loss that is closed at a time. It is calculated from the volume of the farthest losing order.
  2. "Volume of first average order" - the volume of the first averaging order. It is calculated from the part to close.
  3. "TakeProfit in points for partial close" - the TakeProfit for a partial close. It is calculated from your broker's spread.
  4. "Step for average" - the step between averaging orders. It is calculated from the ATR of your symbol.

These four settings determine the load on the deposit and the speed of recovery. How to calculate them is described in section 6.

Note! Information that is not covered in this article but is available elsewhere:

The full list of inputs with a description of each one is here: https://www.mql5.com/en/blogs/post/777042

The description of the EA panels (simple and new) with comments on each part is here: https://www.mql5.com/en/blogs/post/777041


The article contains the following sections:

  1. Testing a drawdown.
  2. The main strategy of the EA.
  3. Leaving the waiting mode.
  4. Automatic locking.
  5. Disabling other EAs. Launch settings.
  6. Setup recommendations (the four main settings).
  7. Trend filters.
  8. The current group of orders. Commission calculation.
  9. Notification settings.
  10. Identifiers and how to change them.


1. Testing a drawdown.

Always test any settings before launching on a real account.


Tester: To test, run the EA in the Strategy Tester in "Visual mode".


1 - the visual mode checkbox.

If this checkbox is not shown in the tester settings window, try stretching the window vertically: "Visual mode" is hidden when the window is compressed.


Volumes: To test a specific drawdown, choose a deposit similar to the one you plan to recover.


1 - deposit, 2 - leverage.

In the "Type of Launch" variable choose a drawdown mode and set its value in the "Drawdown in percentage or in money to Launch" variable. Now the EA will not start working in the tester until the specified drawdown is reached. Alternatively, run the EA in "Instant start" mode and use the "Stop Recovery" button on the EA panel to build the position volume you need before the EA starts working. Please note that in MT5 in "Instant start" mode the EA itself opens a pair of orders, Buy 0.10 and Sell 0.10, on the first tick of the tester, so for testing it is more convenient to launch at a drawdown.

Launch at a drawdown: In the inputs, select "Drawdown in percentage or in money to Launch" and specify the size of the drawdown at which the EA will start recovery.

  • For testing it is better to use a drawdown either equal to or slightly larger than your real drawdown.

How to build the drawdown you need for testing:

Start testing in the Strategy Tester. Then press pause on the EA panel (the "Stop Recovery" button). After that, using the panel in the lower right corner, open orders with a volume equal to your real situation (in lots). The volume is entered in the "Order Size" field, and an order is opened with the "Open Buy" or "Open Sell" button. Before starting the test, set the "Open Average orders via Panel" variable to "Off", then these orders will become part of the losing position that the EA will recover. Now turn off the pause on the main panel. AW Recovery will start recovery once the drawdown specified in the inputs is reached.


1 - the "Order Size" field, 2 - the "Open Buy" button, 3 - the EA is waiting for the drawdown.

This way you can test a specific situation and check your settings.

Testing in short:

Run the tester in "Visual mode", then press pause on the EA panel (the "Stop Recovery" button).

Open the required volume of orders using the panel.

Now press the "Start Recovery" button to start the recovery process.

Testing tips:

  • Before the test, calculate the four main settings as described in section 6: the step, the volume of the first averaging order, the part to close and the TakeProfit. With default settings the test will not show your real situation.
  • Choose the same leverage in the tester as on your account.
  • Take a test start date after which the price moved against your position for a long time: this way you check the most difficult stretch for the EA.
  • Use the same timeframe the EA will work on in your account. M15 - H1 are suitable: on M5 and lower there are too many orders, on H4 and higher recovery takes a long time.
  • Recovery is complete when the message "No orders to recover" appears at the bottom of the panel. After the test, look at the maximum equity drawdown in the tester report: your account should have that much free margin in reserve.


2. The main strategy of the EA.

AW Recovery EA locks* the position so that the loss cannot grow. If the "Close profit at Launch" variable is enabled, the EA first closes some of the profitable orders to reduce the difference between Buy and Sell (see section 3 for details). For the remaining difference the EA opens additional locking orders so that the number of BUY lots equals the number of SELL lots. In this situation, wherever the market goes, the loss will not increase.

Once the position is locked, the EA starts opening averaging orders*, and the profit from these orders goes towards recovering part of the loss.

After the position is fixed, the EA virtually splits the losing position into small separate parts. Each small part is closed separately, this is called partial closing*. Such closing puts less load on the deposit and makes the recovery process as safe as possible.

  • Locking is equalizing Buy and Sell orders by volume. Locking is used to fix the loss in its current state: if the volumes are equal, the loss stays the same when the price changes. With a locked position the loss grows only through swaps charged by the broker, so take this into account when calculating risks.
  • Averaging orders are orders the EA opens in order to recover the losing position with their profit. Averaging orders can also be opened manually using the EA panel.
  • Partial closing - when closing, the EA does not close orders in full. That is, if there is an order with a large volume, the EA virtually divides it into small parts and does not close the whole volume at once, but closes the order in parts. For example, an order of 1.00 lot can be closed in parts of 0.10 lot or, for example, 0.05 lot.


Opening orders:

The EA opens the first averaging order. Averaging orders can generate a temporary additional loss, because the EA uses a grid strategy when opening averaging orders. The EA opens a new averaging order if the previous one is at a loss.

The EA opens averaging orders at a distance equal to "Step for average", which can be multiplied with the "Multiplier to step" variable. This distance between orders is used when working without a trend filter (see section 7. Trend filters for details). The first averaging order opens when the price moves away from the center of the position by half a step, the following ones - by a full step from the last averaging order of the same direction.

The first averaging order has the volume "Volume of first average order", the following averaging orders differ by the "Multiplier to volume" factor. The trader can choose which order types the EA may use, which is important for trading with the trend.

The EA can also work in both directions at the same time; this is set by the "Multidirectional trading" variable. That is, if averaging orders are already open, the EA gets the ability to trade in the direction of the current trend, not only against it.

Depending on the trader's aggressiveness, opening more than one order per candle can be adjusted with the "One Opened Order per Bar filtering" variable. The EA can open new averaging orders as soon as an opening signal occurs, and then more averaging orders will be opened. Or, for safer work, the EA can open only one order of one direction per candle. This limits the number of orders, and this option is safer in case of sharp price swings.

How is the direction of the first order determined?

If trading in both directions is disabled, orders are opened towards the center of the position (the middle of the losing position between the farthest and the nearest order) to return to the average value.

If trading in both directions is allowed in the inputs and no trend filter is used, the order towards the center of the position opens as usual. In addition, when the price has moved away from the center by more than half a step, the EA can also open an order in the direction of the last closed candle: a rising candle - Buy, a falling candle - Sell. After this order, orders are opened according to the step conditions.

Opening the first order in the opposite direction is also governed by this filter. That is, the two directions work independently of each other and do not interact when opening.


Closing orders:

Averaging orders are opened with a small volume, and once the profit on these orders exceeds the part to close, the closing takes place.

The EA closes orders partially to recover the loss. The profit from averaging orders covers a part of the losing position. The losing position is closed in parts. At the same time, the EA treats the losing position as a single structure.

For example: A losing position with a volume of 1 lot. At launch the EA locks the position, virtually splits it into several parts and closes each of them separately.

That is, an order with a volume of 1 lot can be divided into 10 parts of 0.10, each of which is closed separately.

Partial closing consumes fewer deposit resources, leaves more free margin and does not require opening large volumes. It is partial closing of the losing position that makes the loss recovery process safer and more stable.


Overlap when closing:

The EA includes an intelligent system for closing averaging orders. In this algorithm the basket of averaging orders may be closed not completely, as usually happens. Only the very first and the very last averaging orders of one direction are closed. This is done to put less load on the deposit, since each time averaging orders are closed, a part of the losing order is closed too. It is used when there is no need to close the whole basket, so the EA can close only the part that reduces the total volume of the basket of averaging orders and reduces a part of the losing position. When closing the last part of the position, the EA does not use this function.

You can adjust this in the inputs: in the "Allow overlap after number of orders" variable, enter the value after which this function becomes active. The additional TakeProfit for the first and last orders becomes available after the number of recovery orders of one type exceeds the specified number. The EA uses this function only when the losing position has several stages of partial closing left.

For example: If "Allow overlap after number of orders" is set to "3", then with a grid of more than 3 orders the EA will not close all orders at once, but will close only the very first one it opened and the very last one. The remaining orders will be closed later, when the next averaging orders are opened. Besides the averaging orders, the EA will close a part of the losing position each time.


TakeProfit for the whole basket:

AW Recovery calculates the profit of absolutely all orders it works with (the entire losing position, all locking orders, all averaging orders of both directions). When the total profit reaches the value set by the trader, the whole basket is closed and the recovery is complete. This can be especially useful during sharp market moves on news, or when AW Recovery is used as a trading panel.

The EA will close the whole basket of orders if it is in profit by the amount in money set by the trader. This is controlled by two variables:

Use TP for total busket if possible - allows a TakeProfit in the deposit currency for the whole position, including recovery orders. When the variable is enabled, set the TakeProfit value in the "TP for total basket in money" variable.

TP for total basket in money - the amount of profit of all orders (the locked position and averaging orders together) at which the whole position is closed. Close everything if the total profit reaches the specified amount in money. The variable is active only if "Use TP for total busket if possible" is set to "ON".

If the EA closed the whole position at once, it means the last part of the position was closed, the TakeProfit for the whole basket was hit, or the "Close All" button was pressed.


3. Leaving the waiting mode.

When the EA leaves the waiting mode or is launched in "Instant start" mode, it performs a number of operations. Here is the list of these actions:


Disabling other EAs.

When it starts working, the first check AW Recovery performs is the function of disabling other EAs. It is controlled by the "Disable other EAs at Launch" variable.

Disabling other EAs is needed to avoid conflicts between orders. The EA can disable all EAs on the same symbol or on all symbols, which matters when multi-currency algorithms are used. This is done to disable the EAs attached to those windows. The function is useful when AW Recovery is launched in waiting mode together with another EA on a VPS.

The function makes it easier to meet one of the most important conditions: with automatic locking enabled, the EA you plan to recover must be disabled.

Note! The EA does not disable other EAs one by one, it closes their charts entirely, together with indicators and drawings. After the recovery, these charts will have to be opened and set up again.


1 - "Disable other EAs at Launch".


Deleting pending orders, TP and SL, and closing profitable orders.

One of the actions relevant to position management is deleting pending orders and TakeProfit and StopLoss levels. These actions are used so that the locked position neither decreases nor increases in volume, that is, so that the orders are processed only by AW Recovery.

These functions can be disabled at the trader's discretion.

With the "Delete Pending Orders at Launch" variable enabled, the EA deletes at launch all pending orders whose identifiers belong to the identifier of the processed position.

With the "Close profit at Launch" variable enabled, the EA starts its work by closing profitable orders of the side with the larger volume, and only in the amount of the difference between Buy and Sell. For example, with Buy 1.00 and Sell 0.60 the EA will close up to 0.40 lot of profitable Buy orders. The profit stays on the balance, and the lock becomes smaller. This function works only when the "Use locking" variable is enabled.

With the "Delete SL and TP" variable, the EA deletes at launch all TakeProfit and StopLoss levels set manually or by other algorithms whose identifiers belong to the identifier of the processed position.

In MT5 the "Delete SL and TP" variable has three options: "Off" - levels are not deleted, "Delete At Launch" - deleted once at launch, "Delete Always" - deleted throughout the whole work, including levels set later. In MT4 there are two options: On and Off.

The variables that control these settings are marked in the image below.


1 - "Delete Pending Orders at Launch", 2 - "Close profit at Launch", 3 - "Delete SL and TP".

Note! All the actions described in this section are performed by AW Recovery at the moment it leaves the waiting mode. After recovery in the drawdown launch modes, the EA returns to the waiting mode by itself and will perform them again at the next drawdown. In "Instant start" mode they are performed once per launch.

4. Automatic locking.

Locking as such is putting the position into a lock. That is, the EA equalizes the volumes of OP_BUY and OP_SELL orders. This is done so that the position is fixed in its current state and its loss does not grow due to price movements. Automatic locking is enabled in the EA inputs, in the "Use locking" variable. If locking is enabled, the EA will lock all orders it can process, except averaging orders. This way the loss is fixed in its current state automatically.

Automatic locking works during the whole time the EA is running, that is, while it is active you cannot close orders manually or open additional orders manually - the locking algorithm will be triggered.

A locking order can sometimes have a large volume - this is normal, it happens if there is a big difference between the volumes of your Buy and Sell orders.

Note! Locking is possible only on a hedging account (Hedge), where Buy and Sell orders can be held on one symbol at the same time. The account type is shown in the title of the terminal window. On a Netting account an opposite order simply reduces the position, and no lock is created.


1 - "Use locking".

When should locking be disabled?

  • If you want to add or close orders manually, disable the locking function.
  • Parallel work with other algorithms is possible only with automatic locking disabled.
  • Locking makes sense when the processed orders are not touched from outside and AW Recovery can be allowed to manage the position on its own.


A locked position: Buy 0.50 and Sell 0.50 on the panel.

Note! If AW Recovery is running on a VPS, disable the copy running in the terminal on your computer, so that the two AW Recovery copies cannot conflict with each other.


5. Disabling other EAs. Launch settings.

When AW Recovery can be used together with another EA:

  • If locking is disabled, AW Recovery can be used together with other EAs.
  • If the EAs have different MagicNumbers or AW Recovery does not recover orders processed by other EAs, they can also be used together.

When AW Recovery cannot be used together with another EA:

  • When permanent automatic locking is enabled, other EAs must be disabled.
  • You also need to make sure that AW Recovery runs from only one place at a time.

How AW Recovery disables other EAs:

It is better to disable other EAs while AW Recovery is working.

AW Recovery starts its work by disabling other windows. If this function is enabled, AW Recovery starts trading only after the stage of closing other windows is complete. If you launched the EA with this function off and then reconfigured and enabled it during work, closing other EAs may not work.

For this, the "Disable other EAs at Launch" variable offers three options:

  • Do not disable other advisors - AW Recovery will not disable other windows.
  • Disable advisors on same Symbol - AW Recovery will disable all EAs on the current symbol, and you can continue working with other EAs on other symbols.
  • Disable advisors on all Symbols - with this option AW Recovery will disable all windows on all symbols, but will work only on the current symbol.

How to launch AW Recovery to start working when a specified drawdown is reached:

To set the moment when AW Recovery starts, go to the "LAUNCH SETTINGS" block of inputs. The launch options for AW Recovery are set in this block.

1) In the "Type of Launch" variable you can choose:

  • "Instant start" - start at the moment the EA is turned on, that is, AW Recovery starts working as soon as a losing order appears.
  • "Start at drawdown in percent" - start when the drawdown reaches a percentage. AW Recovery analyzes orders from the moment of initialization, but starts working only when the drawdown reaches a certain percentage of the deposit.
  • "Start at drawdown in money" - start when the drawdown reaches an amount in money. AW Recovery can start working when the drawdown reaches a certain amount in the trader's deposit currency.

2) Then enter the drawdown value in the "Drawdown in percentage or in money to Launch" variable.

3) After that, choose what AW Recovery should do with your other EAs at the moment of start. In the "Disable other EAs at Launch" variable, select one of these options:

"Do not disable other advisors", "Disable advisors on same Symbol", "Disable advisors on all Symbols".

I recommend disabling other EAs on the symbol where AW Recovery works, so that there are no conflicts between EAs.

If the terminal restarted during recovery, set the "Type of Launch" variable to "Instant start", otherwise after the restart the EA will wait for the drawdown again.


6. Setup recommendations.

This is the main section of the article. Here the four required settings are calculated in order: the part to close, the volume of the first averaging order, the TakeProfit for partial closing and the step. Do not launch the EA without this calculation.

Setting the part to close:

It is set by the "Part to close from a loss-making position" variable. Setting this variable individually is very important, because it is the part of the loss that will be closed from orders of each type during a partial close of the position. It determines what volume will be closed with the profit from recovery orders.

For better work of the EA, the "Part to close from a loss-making position" variable should have a smaller volume than "Volume of first average order". This is important to increase the probability that the profit from one recovery order is greater than the loss of the closed part of the position.

When determining the volume of the part to close, consider the volume of the farthest losing order, as the most difficult one to close.

For correct work at a medium risk level, it is advisable to virtually divide the losing order into about 6-8 parts.

That is, if the farthest order has a volume of 1 lot, the part to close can be from 0.16 lot to 0.12 lot. In some cases this number can be changed in one direction or the other.

"Part to close from a loss-making position" = volume of the farthest losing order / 6 or 8.

To find the farthest losing order, look at the current price and then find which of the losing orders is farthest from the current price (on the chart). Use the volume of the farthest order for the calculation.

That is, you need to find the order whose open price is the most distant from the current price (the highest price for Buy orders and the lowest price for Sell orders).

If you use a grid strategy, take the volume of the average order. To do this, add up the volumes of all your orders and divide the sum by the number of orders.


Setting the volumes of averaging orders:

It is set by the "Volume of first average order" variable; in addition, you can use a dynamic multiplier of averaging order volumes, set by the "Multiplier to volume" variable.

The volume of the first averaging order should be greater than the part to close. I recommend an average ratio of 1:1.5. This parameter can change depending on the available volumes, distance and current volatility. You can check different ratios in the Strategy Tester and see which level of aggressiveness suits you.

"Volume of first average order" = "Part to close from a loss-making position" * 1.5.


When the "Multiplier to volume" variable is used, each next recovery order in the grid will be larger than the previous one by this factor. With a small order volume (for example, 0.01) and a small multiplication factor, the system also takes the number of orders into account, which allows proper multiplication when the order volume cannot grow after basic normalization. It is not advisable to use values less than "1" without good knowledge of how pyramiding order systems work.

For example: "Volume of first average order" = 0.01, "Multiplier to volume" = 1.3.

0.01 * 1.3 = 0.013 - this value is not allowed by the terminal, because the minimum value is 0.01 (only two decimal places are allowed). This means that after the first order, the second order of the same direction will open with a volume of 0.01, while the EA takes its real volume into account for multiplication.

Next, the third order is calculated as 0.013 * 1.3 = 0.0169; by the rules of mathematical rounding, the third order in the basket of same-direction orders will have a volume of 0.02.


Setting the TakeProfit for partial closing:

The TakeProfit uses the profit from recovery orders, as well as the loss of the part with the volume of "Part to close from a loss-making position" lots from each order type of the losing position.

To get the minimum value of "TakeProfit in points for partial close", multiply the spread you are using by at least 3, so that the spread and slippage at closing are not greater than the TakeProfit value and the closing is profitable.

"TakeProfit in points for partial close" = current spread multiplied by 3 or more.

If this value is smaller, slippage may be greater than the profit from the TakeProfit.

You can see the spread in the "Market Watch" window: right-click - "Columns" - "Spread". For example, the EURUSD spread is 13: 13 * 3 = 39, round up to 40. There is no need to set much more, because this is a small plus on top of the closed loss, and a TakeProfit that is too large will only slow down recovery.


Setting the step between averaging orders.

It is set by the "Step for average" variable; in addition, you can use a dynamic grid step, set by the "Multiplier to step" variable.

The step between averaging orders. If the step is too small, the number of averaging orders will increase, which can increase the drawdown. If the step is too large, it can greatly slow down the recovery process. The step between averaging orders is calculated from the current volatility. For this you can use the ATR indicator on the daily timeframe.

The readings of this indicator show the current average daily volatility of the selected instrument, and therefore what step there should be between the EA's averaging orders. The readings depend on the instrument used, since different instruments have different daily volatility. The trader's task is to determine the average daily volatility. To do this, use the "Average True Range" (ATR) indicator on the "D1" (Daily) timeframe with the period "14" for medium activity. For high activity (for example, when trading gold) you can use half of the ATR value. Determine the average daily volatility while excluding abnormal behavior of the indicator (strong spikes or too quiet stretches of the chart).

How to view the ATR:

  1. Open the instrument chart and click D1 at the top.
  2. Insert - Indicators - Oscillators - Average True Range, period 14, OK.
  3. Zoom out with the "minus" key so that about a year is visible on the screen.
  4. The ATR number is shown in the upper left corner of the indicator window, for example "ATR(14) 0.00729" (1 in the image below). If the line is now much higher than usual for the year (a spike, like 2 in the XAUUSD image below), hover the mouse over the line in a quiet place and take the number from the "Data Window" (Ctrl+D).


The EURUSD chart in the example uses 5 decimal places, and you can see that the average daily volatility is about 730 points (ATR 0.00729).


1 - ATR(14) value: 0.00729, about 730 points.

Based on the data from the chart analysis, we calculate the "Step for average" variable:

For high-risk trading take a small step between orders, then many orders will be opened. Divide the average daily volatility by 4 (729 / 4 = 182 "Step for average").

For medium risk, divide the average daily volatility by 3 (729 / 3 = 243 "Step for average").

For low risk, divide this value by 2 (729 / 2 = 365 "Step for average").

On JPY charts there are usually three decimal places. As you can see in the example below, the average daily volatility of GBPJPY is about 970 points (ATR 0.970).


1 - ATR(14) value: 0.970, about 970 points.

For metals the situation is also slightly different. The number of decimal places is usually two.

This can be seen in the example below: the average daily volatility of XAUUSD is about 5150 points (ATR 51.54).


1 - ATR(14) value: 51.54, 2 - a spike, it is not used, 3 - the usual level of the line.

Example Price Multiplier ATR Step
EURUSD 1.17750 (5 digits) 100 000 0.00729 0.00729 × 100 000 / 2 ≈ 365
Gold 3860.75 (2 digits) 100 51.54 51.54 × 100 / 2 ≈ 2600
Gold 3860.755 (3 digits) 1 000 51.540 51.540 × 1 000 / 2 ≈ 25 800
Bitcoin 96500.25 (2 digits) 100 2606.14 2606.14 × 100 / 2 ≈ 130 000

Example of the step calculation for gold: gold, as in the image above. The price 3860.75 has two decimal places, the multiplier is 100. ATR 51.54. 51.54 × 100 = 5154. 5154 / 2 = 2577, round to 2600 and enter it in "Step for average".

The same gold at a broker with three decimal places: price 3860.755, multiplier 1 000. 51.540 × 1 000 = 51 540. 51 540 / 2 = 25 770, round to 25 800.

To get the ATR value, simply remove all the zeros on the left (as in the EURUSD example): the digits that follow the zeros are taken as the average daily volatility.

For any instrument it is more convenient to multiply the ATR value by one followed by as many zeros as there are decimal places in the price: 2 digits - 100, 3 digits - 1 000, 5 digits - 100 000. For example, for EURUSD 0.00729 * 100 000 = 729, for gold with two digits 51.54 * 100 = 5154.

In MT4 the number of digits in the ATR indicator window may differ from the number of decimal places on your chart (for example, 4 digits for the ATR and 2 for the price). In this case, round the ATR value to the number of digits on the chart. In MT5 the ATR has as many digits as the price, as in the example below.


1 - price with two decimal places, 2 - ATR with the same two decimal places.

The number of decimal places may differ between brokers. This affects the value obtained for the step. This is especially important to consider when you work in terminals of different brokers: check the number of decimal places before launching the EA.


The dynamic grid step is set by the "Multiplier to step" variable. The multiplier allows a more flexible approach to calculating the distance between orders by using a dynamic grid step.

For example: "Step for average" = 100, and "Multiplier to step" = 1.5.

This means that the second order of the same direction opens 100 * 1.5 = 150 points from the first, the third - 150 * 1.5 = 225 points from the second, the fourth - 225 * 1.5 = 338 points, and so on.

That is, this way there will not be too many orders in the basket.

If recovery is slow, it can be sped up with a smaller step (average daily volatility / 4 instead of / 3) or with a volume ratio above 1:1.5, but the load on the account will grow. Check the chosen option in the tester (section 1).

When working with trend filters, the EA may wait for a filter signal in addition to the step, see section 7 for details.


7. Trend filters.

An important part of setting up the EA is setting up trend filters, that is, the signals that finally confirm the opening of an averaging order. Filters are set in the "Trend filtering for average orders" variable.


1 - "Trend filtering for average orders", 2 - "One Opened Order per Bar filtering".

AW Recovery will open orders according to the set strategy only when there is a matching trend determined by one of the indicators. You can choose one of three options:

  • Bulls Bears Candles Filtering - a filter by the color of the last closed candle: a rising candle allows Buy, a falling candle allows Sell; this is checked after the price has passed the step. The EA looks at the candles of the current timeframe, so the choice of timeframe affects the signal.
  • AW Trend Predictor Filtering - the built-in AW Trend Predictor trend indicator. When the "AW Trend Predictor" filter is used, the EA analyzes the indicator readings on the timeframe selected in the "AW Trend Predictor timeframe" variable. For more flexible setup, the indicator parameters can also be adjusted.

When you choose to open averaging orders based on the signals of the built-in "AW Trend Predictor Filtering" indicator, set the "AW Trend Predictor timeframe" variable. The signal is taken from the filter timeframe, and the chart timeframe sets the pace: with "One Opened Order per Bar filtering" = On, no more than one order per direction per chart candle. For filtering, use a higher timeframe. For example, if you work on M15, use M30 or higher for filtering. This filters out market noise.

I recommend enabling "One Opened Order per Bar filtering" together with a higher-timeframe filter, so that many orders are not opened on one signal.

Also, the "Amplitude AW Trend Predictor" variable adjusts the precision of the indicator signals: the higher the value, the lower the sensitivity of the indicator signals (fewer signals); the lower the value you enter, the higher the sensitivity (more signals).

  • Simple grids - the EA will open averaging orders without trend filtering.

Difference in aggressiveness between the three options of the "Trend filtering for average orders" variable:

1) The strictest filtering is possible with the built-in Trend Predictor indicator.

2) Without filtering, orders are opened strictly at the set step (or the step with a multiplier), which can provide a medium level of aggressiveness.

3) The Bulls Bears strategy works by the color of the last closed candle, that is, in the direction of possible price corrections. It can be the most aggressive strategy.


Why didn't the next averaging order open after the set step?

With the "Bulls Bears Candles Filtering" filter, after the step the EA waits for a candle of the right color. With the "AW Trend Predictor Filtering" filter, the first order of the basket opens on an indicator signal, and the following ones - by the step; with "Averaging only by trend direction" also only while the indicator trend points in the direction of the basket. Another reason for a delay is "One Opened Order per Bar filtering": no more than one order per direction per candle.


  • Opening the first order in the basket is set by the "Signals of AW Trend Predictor" variable. It lets you choose whether a new first order (in the basket) opens only when a new signal comes from the indicator, or as soon as the previous ones are closed (more orders).

First trade by trend direction - the EA will open new orders right after the previous ones are closed, throughout the whole trend direction. When one basket (with grids) or one order is closed, new orders will open in the current trend even without a new signal (more trades).

First trade at trend reverse - the EA will open new orders only when a new signal comes from the indicator. That is, the EA trades once per signal. This way only one grid can open during one trend (fewer trades).

  • Opening the following orders in the basket after the first order is set by the "Averaging with Trend Predictor filtering" variable.

Averaging in any direction - after the first order is opened on a Trend Predictor signal, averaging continues regardless of changes in market direction.

Averaging only by trend direction - after the first order in the basket is opened, the grid can develop further only while the current trend points in the same direction. Only orders that match the direction of the Trend Predictor indicator can be averaged (at the moment each next order is opened).


8. The current group of orders. Commission calculation.

While working, AW Recovery does not close individual orders in full. The whole position, divided into orders, is virtually split into smaller parts. The EA closes individual orders in parts; closing a part of an order requires less generated profit and a smaller volume of averaging orders to open. It is partial closing that makes it possible to recover positions more safely.


1 - lock, 2 - part, 3 - averaging trades by step, 4 - closed Buy and Sell part, 5 - and so on down to zero.

The current group is a virtually allocated part to close. The EA determines the current group from the losing position (a part of the long and short positions), together with the averaging orders that will close these parts of the position. The volumes, number of orders and profit of the current group are shown in the current group panel. This panel also lets you close the current processed group in one click.

Swaps and commissions of losing and averaging orders are taken into account when calculating the group (how commission is taken into account in MT5 - see below). Also, on ECN accounts the broker may charge additional commissions for a partial close on the whole volume of the orders formed as a result of closing a part, that is, on the full remainder each time a part is closed. The calculation of these additional commissions can be changed with the "Use full commission when calculating" variable, if you use an ECN account.

Use full commission when calculating - this variable controls how commission is accounted for. This is relevant for some types of ECN accounts. With some brokers, a partial close charges the full commission for the newly formed order.

That is, if you have an order of 1 lot and you close a part of 0.01 from it, the broker will charge commission on the remaining 0.99, since it counts this volume as a new order.


This is rare, but the EA lets you enable or disable this accounting. That is, if "Use full commission when calculating" = "true", the EA will take into account the additional full commission for each partial close.

If your account does not charge this additional amount, the variable should be set to false. By default, accounting of the full commission for partial closes is disabled, that is, everything works as on most account types.

Commission in MT5. In MT5 an open position has no commission field, the commission is visible only in the deal history. Therefore, if your broker charges a commission, enter it per 1 lot in the deposit currency in the "Comission per 1 Lot(0-no comisions)" variable. Without it, the "Use full commission when calculating" variable changes nothing in MT5. On accounts without commission, leave 0.


9. Notification settings.

The AW Recovery EA can send three types of notifications:

  • Alerts.
  • Emails.
  • Push notifications to the trader's mobile terminal.

Notifications are sent in the following cases:

  • The EA leaves the waiting mode and starts recovering the position.
  • Recovery is complete, at the moment the last part of the position is closed.

Sending notifications is enabled or disabled in the inputs, in the "Notifications at launch and end of work" variable.


1 - "Notifications at launch and end of work".

  • To enable email notifications, you need not only to enable the corresponding variable in the EA, but also to set up the terminal itself. To do this, go to "Tools" - "Options" (or press Ctrl+O); this menu has an "Email" tab where you enter the corresponding values. This menu has detailed help available via the corresponding button in the window.


1 - enable email notifications, 2 - mail server details.

  • An alert (a message window) is enabled by the same variable, no additional checkboxes are needed.
  • To set up push notifications, besides the installed MetaTrader app, you need to make a couple of settings. To do this, go to "Tools" - "Options" (or press Ctrl+O); this menu has a "Notifications" tab where you enter the MetaQuotes ID taken from your MetaTrader app.

1 - enable push notifications, 2 - MetaQuotes ID from the mobile MetaTrader.

Attention!

Notifications are sent by the methods the trader has connected.

If all three notification methods are connected, AW Recovery will send notifications by all of them.


10. Identifiers and how to change them.

The EA identifies orders in two groups:

  • The group of locked orders, that is, all the orders the EA will recover and close in parts.
  • The group of averaging orders, that is, the orders the EA uses to recover the orders from the locked group.

Locked orders are the positions "AW Recovery" will work with; they are set by the "MagicNumbers group for recovery" variable. You can choose to work with different groups of orders:

  • "All orders on same symbol" - with this option AW Recovery will process absolutely all orders opened on the same symbol as AW Recovery.
  • "Manual opened orders on same symbol" - this option means that AW Recovery will process only the orders of the symbol whose MagicNumber equals the one used in AW Recovery, orders with MagicNumber "0", that is, opened manually, and orders with a MagicNumber from the "MagicNumbers for recovery" list. This way manual orders opened with the AW Recovery panel are treated as processed by the EA. The group of orders opened via the panel depends on the "Open Average orders via Panel" setting.
  • "Same MagicNumbers on same Symbol" - this option is for working with selected MagicNumbers. That is, AW Recovery will process only the orders of the current symbol whose MagicNumbers are entered in the MagicNumbers for recovery (sep by comma ",") variable.

If you need to recover a drawdown made by a specific EA or a group of EAs, use the option of working with specific MagicNumbers. To work with specific MagicNumbers, enter their Magic in the "MagicNumbers for recovery (sep by comma ",")" variable. In this case AW Recovery EA will recover the loss only of the EAs that made the drawdown on the account. To recover an order opened manually, use the value "0" in this variable.

The MagicNumber of another EA is shown in its inputs (usually the Magic or MagicNumber variable).

If there is a specific order that, in the trader's opinion, should be processed first regardless of its difficulty, this can be set with the "First ticket for recovery (0-not used)" variable. In this case, enter the ticket of the order to be processed first. Since the EA closes the position evenly in both directions, the opposite order will be selected according to "What orders to start from".

In addition, the EA has a built-in function to determine which orders are processed first. It is set by the "What orders to start from" variable. That is, AW Recovery will try to close either the most difficult or the easiest orders first.

How to determine the best option in the "What orders to start from" variable?

With large position volumes, to reduce swap charges faster, the "Start with easy to close orders" option is more appropriate, since in this case "AW Recovery EA" first processes the orders that are easiest to close. That is, processing starts with partial closing of the orders whose loss per minimum volume is the smallest.

With a small position volume, the "Start with hard to close orders" option can sometimes be relevant. In this case the worst elements of the losing position are processed first. With this choice there is a chance of closing the whole position at TP. That is, the EA will first close the orders that are the most difficult to process, i.e. first partially close the orders whose loss per minimum volume is the largest.

The AW Recovery EA averaging orders are identified by the order Magic Number. In the "MagicNumber of average orders (Should be unique)" variable, enter a unique number to identify recovery orders, so that AW Recovery orders do not overlap with the orders of other EAs.

In some situations it may become necessary to change the strategy; in such cases you can change the "MagicNumber of average orders (Should be unique)" identifier and process the old recovery orders together with the rest of the losing position within the new recovery strategy.

How does "AW Recovery EA" tell its own orders from others?

Orders opened by AW Recovery are treated as its own, all other orders are treated as others. To close losing orders, the EA uses the profit only from its own orders.

If you change the MagicNumber in the "MagicNumber of average orders (Should be unique)" variable during work, then in the "All orders on same Symbol" mode the previously opened orders will become others for AW Recovery, and the program will lock them. In the "Manual opened orders on same Symbol" and "Same MagicNumbers on same Symbol" modes the EA will stop seeing the old orders altogether: it will neither lock nor recover them.

This can be useful if you made a mistake in the AW Recovery settings and increased the drawdown: then you can change the MagicNumber and the position will be locked.


Buy AW Recovery EA right now:


MT4 version
👉 https://www.mql5.com/en/market/product/49453


MT5 version
👉 https://www.mql5.com/en/market/product/49692

AW Trading Software

Support: https://www.mql5.com/en/users/nechaevrealle