Instructions for setting up and testing the AW Recovery Expert Advisor

Instructions for setting up and testing the AW Recovery Expert Advisor

22 June 2022, 17:46
AW Trading Software Limited
6
10 968

The Expert Advisor is a system designed to recover unprofitable positions. The author's algorithm locks a losing position, splits it into many separate parts, and closes each of them separately.It is the use of closing losses in parts that allows you to reduce losses with a lower deposit load, which ensures safer work with losses, in contrast to grid strategies that close orders only in whole groups.

AW Recovery is not a multi-currency advisor. To work with different tools, launch AW Recovery in different windows on each of the required tools AW Recovery works on any instruments (currencies, indices, oil, metals, stocks).

In this article, you will find information about what the product strategy is, how to set it up correctly, and how to test drawdown.

Note! And information that will not be covered in this article, but prepared elsewhere:

A complete list of input settings with a description of each of them is located here: https://www.mql5.com/en/blogs/post/749512

Description of the EA panels with comments on each part of all three panels can be found here: https://www.mql5.com/en/blogs/post/750270


The article contains the following sections:

  1. Drawdown testing
  2. The main strategy of the adviser.
  3. Exit standby mode.
  4. Automatic locking.
  5. Disabling other advisors. Launch adjustment.
  6. Recommendations for setting.
  7. trend filters.
  8. The current group of orders. Calculation of commissions.
  9. Notification settings.
  10. Identifiers and their change.


1. Testing the drawdown.

Always test any settings before launching on a live account. 


Tester: For testing, run the EA in the strategy tester in the mode "Visualisation".


If there is no this checkbox in the settings window of the tester, then try to stretch the window in height, the fact is that "Visualisation" hidden when the window is shrunk.


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



In the "Type of the launch" variable, select the drawdown mode, and specify its value in the "Drawdown in percentage or in money to run" variable. Now, during testing, the Expert Advisor will not start working until the specified drawdown is reached. Or launch the Expert Advisor in "Instant Launch" mode and use the "Stop Recovery" button on the adviser panel to set the required position volume before starting the adviser.


Drawdown launch: In the input settings, you must select "Drawdown in percentage or in money to Launch" and specify the amount of drawdown, upon reaching which the EA will start recovery.

  • It is better to use a drawdown volume for testing that is either equal to or slightly larger than your actual drawdown. 

How to get the required drawdown level for testing: 

Start testing in the strategy tester. After that, click on the pause on the advisor panel ("Stop Recovery" button). Then, using the panel located at the bottom right, open orders with a volume equal to your actual situation (in lots). Disable pause on the main panel. AW Recovery will start recovery after the drawdown size specified in the input settings is reached. 


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

Briefly about testing:

Start the mode in the tester "Visualisations", then press pause on the Expert Advisor panel (button "Stop recovery").

Using the panel, open the required volume of orders.

Now continue to work again click on the button "Stop recovery" to start the recovery process.


2. The main strategy of the adviser.

AW Recovery EA locks* position so that the loss cannot grow. First of all, the adviser looks for profitable trades and reduces some of the losing orders at their expense. If this does not allow to level the position, the EA will open additional locking orders so that the number of BUY lots is equal to the number of SELL lots. In this situation, no matter where the market trend goes, the size of the loss will not increase. 

When the position is locked, the EA starts to open averaging orders*, the profit from these orders is used to recover part of the loss.

After the position is fixed, the adviser virtually splits the unprofitable position into separate small parts. Each small part is closed separately, this is called partial closure*, with such closure, the deposit is loaded less and the recovery process becomes the safest. Locking is the alignment of orders of the Buy and Sell types by volume. Locking is used to fix a loss in the current position, if the volumes are the same, then when the price changes, the loss will remain the same. If there is a locked position, the increase in loss is due to the accrual of swaps by the broker, this should be taken into account when calculating risks.

  • Locking is the alignment of orders of the Buy and Sell types by volume. Locking is used to fix a loss in the current position, if the volumes are the same, then when the price changes, the loss will remain the same. If there is a locked position, the increase in loss is due to the accrual of swaps by the broker, this should be taken into account when calculating risks.
  • Averaging orders are orders that the EA opens in order to use their profit to recover a losing position. Averaging orders can also be opened manually using the Expert Advisor panel.
  • Partial closing - when closing, the EA does not close orders entirely. That is, if there is an order with a large volume, the EA will virtually divide it into small parts and will not close the entire volume at once, but will close the order in parts. For example, an order of 1.00 lots can be closed in parts of 0.10 lots or, for example, 0.05 lots.

Opening orders:

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

The EA opens averaging orders with a distance equal to "Step for average", can be multiplied with a variable "Multiplier to step". This distance between orders will be applied when working without a trend filter (for more details, see section 7. Trend filters).

The first averaging order is equal to "Volume of average order", the following averaging orders will differ by a factor "Multiplier to volume". The trader can choose the type of orders that the EA can use, which is important for working with the trend.

Also, the EA has a built-in ability to work simultaneously in both directions, it is regulated by the variable "Multidirectional trading"That is, if there are already open averaging orders, the adviser will be able to trade in the direction of the current trend, and not just against it.

Depending on the aggressiveness of the trader, the possibility of opening more than one order per candle can be adjusted using the variable "One Opened Order per Bar filtering". The EA can open new averaging orders, as soon as the signal for opening occurs, more averaging orders will be opened. Or for safer work, the EA can only open one order of one direction per candle. Thus, the number of orders will be limited, this option is safer in case of sharp price fluctuations.

How is the direction for the first order determined?

If trading in both directions is disabled, then orders will be opened towards the center of the position (the middle of the losing position between the farthest and closest orders) to return to the average value.

If two-way trading is allowed in the input settings and no trend filter is applied: then the EA will independently determine in which direction to open the first restoring order based on the BullsBears Candles Filtering signal. Further after this, orders will be opened according to the step conditions.

Opening the first order in the opposite direction will also be regulated by this filter. That is, the two directions work separately from each other and do not interact when opened.


    Closing orders:

    Averaging orders are opened with a small volume, after the profit on these orders exceeds the closing part, the closing will occur. 

    The EA performs partial closing of orders in order to recover the loss.Profit from averaging orders covers part of the unprofitable position.Closing of a losing position occurs in parts. At the same time, the adviser perceives a losing position as a single structure.

    For example: A losing position with a volume of 1 lot. When launched, 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 with a volume of 0.10, each of which will be closed separately.  

    Partial closing allows you to consume less deposit resources, leaves more free funds and does not need to open large volumes. It is due to the partial closure of a losing position that the process of recovering losses can occur more safely and stably.


    Closing Overlap:

    The EA includes an intelligent system for closing averaging orders. In this algorithm, the basket of averaging orders may not close completely, as it usually does. Only the very first and the very last of the averaging orders of the same direction are closed. This is done in order to load the deposit less. Since with each closing of averaging orders, a part of the unprofitable order is also closed. It is used if there is no need to close the entire basket, so the EA can close only the part that will reduce the total volume of the basket of averaging orders and reduce the part of the unprofitable position. When closing the last part of a position, the EA does not use this function.

    You can adjust this in the input settings using the variable "Allow overlap after number of orders"enter the value after which this function will be active. The use of additional TakeProfit for the first and last orders will be available after the number of restoring orders of the same type reaches the specified number. This function is used by the EA only in those cases when a losing position has several stages of partial closure left.

    For example:  If in a variable "Allow overlap after number of orders" set to "3", then in the case of a grid of more than 3 orders, the adviser will not close all orders at once, but will close only the very first one that it opened and the last one. The remaining orders will be closed later when the next averaging orders are opened. In addition to averaging orders, the adviser will close part of the losing position.


    TakeProfit for the whole basket:

    AW Recovery calculates the profit from all orders with which it interacts (completely the entire losing position, all locking orders, all averaging orders in both directions). In the case when the entire total profit reaches the value specified by the trader, the entire basket will be closed and restored completed. Such work can be especially relevant during sharp news market movements, or when AW Recovery is used as a trading panel.

    The EA will close the entire basket of orders if it is in profit, by the value specified by the trader in money. The adjustment consists of two variables:

    Use TP for total basket if possible - Allow the use of TakeProfit in the deposit currency for the entire position, including restoring orders. When the variable is enabled, you must set a value for TakeProfit in the variable "TP for total basket in money".

    TP for total basket in money - Adjustment of the profit volume from all orders (blocked position, averaging orders together), upon reaching which the entire position will be closed. Close all if the total profit reaches the specified amount in money. The variable is active only if the value in the variable "Use TP for total basket if possible" is set to "ON".


    3. Exit standby mode.

    When the EA leaves the standby mode, or starts in the "Instant Start" mode, it performs a certain amount of operations.Here is a list of these actions:


    Disabling other advisors.

    At the start of work, the first check that the AW Recovery is a function to disable other Expert Advisors. It is controlled by the "Disable other EAs at Launch" variable.

    Disabling other advisers is necessary in order to avoid conflict between orders. The Expert Advisor can disable all Expert Advisors from the same symbol or from all symbols in general, which is important when using multi-currency algorithms. This was done in order to disable Expert Advisors attached to these windows. This feature is useful when starting AW Recovery in standby mode with another advisor on the VPS.

    The function makes it easier to comply with one of the most important conditions - when automatic locking is enabled, it is necessary to disable the Expert Advisor that is planned to be restored.



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

    One of the actions relevant for position management is to remove pending orders, TakeProfit and StopLoss levels. These actions are used to ensure that the position that is aligned to the lock does not decrease or increase in volume, that is, that orders are processed only by the AW Recovery.

    At the discretion of the trader, these features can be disabled,

    When running the "Delete Pending Orders at Launch" variable, the EA will delete all pending orders whose IDs refer to the ID of the position being processed at startup.

    When turned on variable "Close profit at Launch" the adviser will start its work by closing all profitable orders being processed and, using the released profit, will close unprofitable orders.

    When using a variable "Delete SL and TP" when launched, the EA will delete all TakeProfit, StopLoss set manually or by other algorithms, whose identifiers refer to the identifier of the position being processed.


    The variables that govern the above settings are marked in the image below.


    Note! All actions described in this section adviser AW Recovery commits at the moment of initialisation, only once.

    If after AW Recovery finished recovering a losing position, you want it to continue working in the mode of waiting for a new drawdown, then AW Recoveryneeds to be restarted. If not restart AW Recovery, then when exiting the standby mode AW Recovery will not perform the actions described in this section (disabling other windows, deleting pending orders, etc.) since these actions are performed only once. These actions apply to global variables.

     

    4. Automatic locking.

    Locking as such is the alignment of a position into a lock. That is, the EA equalizes the volumes of orders of the OP_BUY and OP_SELL types. This is done so that the position is fixed in the current position and its loss does not increase due to price movements. Enabling automatic locking occurs in the input settings of the adviser, the variable "Use locking". In the event that locking is enabled, the EA will lock all orders that it can process except for averaging ones. Thus, the loss will be fixed in the current position automatically.

    Automatic locking is valid throughout the entire time of the adviser, that is, in cases where it cannot be actively closed manually or manually opened additional orders, the locking algorithm will work.

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


    When should locking be disabled?

    • If you want to add or close orders manually, you should disable the locking function.
    • Parallel operation with other algorithms is possible only when automatic locking is disabled.
    • Locking is relevant when the orders being processed are not affected from the outside and it is possible to enable AW Recovery single-handedly manage the position.


    Note! If running AW Recovery on the VPS, then you should disable the version that runs on the terminal of your computer so that two AW Recovery could not come into conflict with each other.


    5. Disabling other advisers. Launch adjustment.

    When can I use AW Recovery with another Expert Advisor:

    • If locking is disabled, you can use AW Recovery together with other Expert Advisors.
    • If the Expert Advisors have different MagicNumber or AW Recovery does not restore orders processed by other Expert Advisors - you can also use them together.

    When you cannot use AW Recoverywith another Expert Advisor:

    • In cases where permanent auto-locking is enabled, it is necessary to disable other advisers,
    • You also need to make sure that AW Recovery only works from one location at a time.

    How AW Recovery disables other Expert Advisors:

    it is better to turn off other advisers during operation AW Recovery.

    AW Recovery starts by disabling other windows. If this feature is enabled, then AW Recovery will begin to make trading operations only after the stage of closing other windows has passed. If you have enabled the Expert Advisor without this function active, and in the course of work you reconfigured and enable this function, then closing other Expert Advisors may not work.

    To do this, in the variable "Disable other EAs at Launch" you can select three options:

    • Do not disable other advisors - AW Recovery will not disable other windows. 
    • Disable advisors on the same Symbol - AW Recovery will disable all Expert Advisors on the current symbol, you will be able to continue working with other Expert Advisors on other symbols.
    • Disable advisors on all Symbols - When this variable is selected AW Recovery will disable all windows on all symbols, but will only work on the current symbol.

    How to start AW Recovery to work when the specified landing is reached:

    To adjust the start time AW Recovery you need to select a tuning block "LAUNCH SETTINGS". In this block, options for launching AW Recovery are configured.  

    1) In a variable Type of launch you can choose:

    • "Instant start" - Start at the moment the adviser is turned on, that is AW Recovery will start working as soon as a losing order appears.
    • "Start at drawdown percent" - Start when the drawdown is reached in percent. AW Recovery will analyze orders from the moment of initialization, but will start working only when the drawdown reaches a certain percentage of the deposit volume.
    • "Start at drawdown in money" - Start upon reaching drawdown in money. AW Recovery will be able to start working when the drawdown reaches a certain amount in the currency of the trader's deposit.

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

    3) After that, choose which actions AW Recovery must commit with your other advisors at the start. In a variable "Disable other EAs at Launch" choose one of these options:

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

    I recommend disabling other Expert Advisors on the symbol where AW Recovery is running so that there are no conflicts between Expert Advisors.


    6. Recommendations for tuning.

    Setting the part to close:

    Adjusted by the variable "Part to close from a loss-making position". The individual setting of this variable is very important as it is the part of theloss that will be covered from orders of each type when the position is partially closed.Determines what volume will be closed using profit from restoring orders.

    For better performance of the Expert Advisor, the variable "Part to close from a loss-making positionmust be smaller than "Volume of average order", this is important to increase the probability that the profit from one restoring order will be greater than the loss of the closed part of the position.

    When determining the volume of the part to close the order, one should take into account the volume of the far unprofitable order, as the most difficult to close.

    For correct operation at an average risk level, it is desirable to virtually divide a losing order into approximately 6-8 parts.

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

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

    In order to find a long-term losing order, you need to look at the current price and then find which of the losing orders is farthest from the current price (on the chart). Apply the volume of the farthest order for calculations.

    That is, you need to find an order whose opening price is as far as possible from the current price (the highest price for buy orders and the lowest price for sell orders).


    Setting volumes of averaging orders:

    Adjusted by variable "Volume of average order", additionally, you can use the dynamic multiplier of volumes of averaging orders, regulated by the variable "Multiplier to volume".

    The volume of the first averaging order must be greater than the closing part. I recommend an average ratio of 1:1.5. This parameter may change based on available volumes, distance and current volatility. You can check different odds in the strategy tester and see what level of aggressiveness is right for you.

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


    When using the variable "Multiplier to volume" Each subsequent restoring order in the grid of orders will be larger than the previous one by this coefficient. When using a small volume of orders (for example, 0.01) and a small volume of the multiplication factor, the system also takes into account the number of orders, which allows high-quality multiplication when it is impossible to increase orders after basic normalization. It is undesirable to use values less than "1" without having a good knowledge of the operation of pyramiding order processing systems.

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

    0.01 * 1.3 = 0.013 - This value is invalid for the terminal, since 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 into account its real volume for multiplication.

    Further, the calculation of the third order will be 0.013 * 1.3 = 0.0169; according to the rules of mathematical rounding, the volume of the third order in the basket of similar orders will be 0.02.

    TakeProfit setting for partial closing:

    TakeProfit uses profit from restoring orders, as well as loss, which is part of the volume of "Part to close from a loss-making position" lots from each type of orders from a losing position.

    To get the minimum "TakeProfit for partial close" value, you need to multiply the used spread by at least 3, so that at closing the spread and slippage are not greater than the TakeProfit value, and thus the closing is profitable.

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

    If this value is less than the slippage may be greater than the profit from Take Profit.

    For popular pairs like EURUSD you can use the default value.

    Setting the Step between averaging orders.

    Adjusted by variable "Step for average", additionally you can apply a dynamic grid step, regulated by a variable "Multiplier to step".

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

    The readings of this indicator indicate the average daily volatility for the selected instrument at the moment. Therefore, what step should be between the EA's averaging orders. The readingsdepend on the instrument being used, as different instruments have different daily volatility. The trader's task is to determine the average daily volatility. To do this, you need to use the "Average True Range" (ATR) indicator on the "D1" (Daily) timeframe with a period of "14" for average activity. For high activity (for example, when trading gold), you can use the value of halfATR.It is necessary to determine the average daily volatility, while eliminating the abnormal behavior of the indicator (strong bursts or too calm sections of the chart).

    On the example of the EURUSD chart image, 5 decimal places are used, it can be seen that the average daily volatility is 700 - 750 points.


    Based on the data obtained by analysing the instrument chart, we calculate the "Step for average" variable:

    «Step for average» = Average daily volatility («ATR» D1, period 14) / 4 or 2


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

    In order to use average risks, we divide the average daily volatility by 3 (650 / 3 = 245 "Step for average").

    For low risks, we divide this indicator by 2 (650 / 2 = 368 "Step for average").

    On charts with the JPY symbol, the number of decimal places is usually three. As you can see in the example below, the average daily volatility for the GBPJPY pair will be approximately 1100 - 1200 points.


    For pairs with metals, the situation will also be slightly different. The number of decimal places is usually two.

    This can be seen in the example below, so the average daily volatility for the XAUUSD pair is approximately 1200 - 1300 pips.


    To determine the ATP value, you just need to remove all zeros on the left (as in the example with EURUSD), we take the numbers that will follow the zeros as the average daily volatility.

    There are situations when the number of characters in the ATR indicator window depends on the number of decimal places on your chart. In this case, it is necessary to round the value in ATR to the value that is reflected on the chart. The example uses the same chart with the XAUUSD pair, however, you can see that there are 4 symbols after the decimal point in the indicator window, and 2 symbols on the chart. In order to determine the ATR value, we round off the last two decimal places.


    For different brokers, the number of decimal places may vary. This will affect the value received for the step. It is especially important to take this into account when you work on the terminals of different brokers, check the number of decimal places before starting the adviser.


    Dynamic grid spacing, adjustable by variable "Multiplier to step"Using the multiplier, you can more flexibly approach the calculation of order volumes using the dynamic step of the order grid.

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

    This means that after the first order, the second order of the same direction will open after 100 points, and the third order will have to open after 100 * 1.5 = 150 points. Further, the fourth order will open in 150* 1.5 = 225 pointsand so on...

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

    When working with trend filters, the EA, in addition to the step, will wait for a signal from the indicator before opening a new order.


    7. Trend filters.

    An important point in setting up an adviser is setting up trend filters. That is, setting the final confirmation signals for opening an averaging order. Filters are adjusted in the variable "Trend filtering for average orders"


    AW Recovery will open orders in accordance with the given strategy only if there is a corresponding trend determined by one of the indicators. In total, you can choose one of three settings options:

    • BullsBears Candles Filtering - Custom indicator of reversal candle patterns. When using the "BullsBears Candles" filter, the AW Recovery Expert Advisor analyses the indicator readings on the current timeframe, so the choice of timeframe affects the signal.

    • AW Trend Predictor Filtering - Built-in AW Trend Predictor trend indicator. If the "AW Trend Predictor" filter is used, the EA will analyse the indicator readings for the selected timeframe in the "AW Trend Predictor timeframe" variable. Also, for a more flexible setting of the indicator, the ability to adjust the indicator period is built-in.

    When choosing to open averaging orders, taking into account the signals of the built-in indicator "AW Trend Predictor Filtering" set the variable "AW Trend Predictor timeframe". The entry point will use the timeframe of your current chart. For filtering, it is necessary to use a timeframe of a larger range. For example, if you work on the M15 timeframe, then you need to use the M30 timeframe or more for filtering. Allows you to filter market noise.

    The ability to use a trend filter timeframe that differs from the current one will only be relevant when applying a variable "One Opened Order per Bar filtering" in mode "ON" that is, if on the current timeframe AW Recovery keeps open no more than one averaging order per 1 candle.

      Also setting the variable "Period AW Trend Predictor" will allow you to adjust the accuracy of the indicator signals, the larger the value of the variable, the lower the sensitivity of the indicator signals (rare signals), the smaller the value you entered, the greater the sensitivity of the indicator signals (more frequent signals).

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


      Difference in aggressiveness when using three options in the "Trend filtering for average orders" variable:

      1) The most stringent filtering is possible when working with the built-in indicator trend predictor.

      2) When working without filtering, orders will be opened strictly at a given step (or a step with a multiplier), which can provide an average level of aggressiveness.

      3) Strategy work Bulls Bears - this is work during the reversal of candle patterns, that is, work in the direction of possible price corrections. May be the most aggressive strategy.


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

      If you are working with trend filters, then through "Step for average" points AW Recovery will begin to wait for a signal from a trend indicator to open an averaging order.

      That is, in addition to the step AW Recovery  will wait for a signal from the trend filter and only when the trend gives the appropriate signal, the next order will be opened.

      • The adjustment for opening the first order in the basket is done by the " Signals of AW Trend Predictor" variable. This is the ability to choose to open a new first order (in the basket) only when a new signal from the indicator arrives or as soon as the previous ones are closed (more orders).

      Firs trade by trend direction - the adviser will open new orders immediately after closing the previous ones throughout the entire trend direction. When one basket is closed (when using grids), or one order, even in the absence of a new signal, new orders will be opened according to the current trend (more transactions).

      firs trade at trend reverse - the adviser will open new orders only when a new signal is received from the indicator. That is, the adviser trades once per signal. Thus, only one grid will be able to open during one trend (fewer trades).

      • Adjustment for opening subsequent orders in the basket, after the first order opened. Adjusted by the variable " Averaging with Trend Predictor filtering ".

      Averaging in any direction - After opening the first order on the signal of the Trend Predictor indicator, averaging will occur regardless of the change in market directions.

      Averaging only by trend direction - After opening the first order in the basket, further development of the grid is possible only if the current trend is in the same direction. You can only average those orders that coincide with the direction of the Trend Predictor indicator (at the moment the first order is opened).


      8. Current group of orders. Calculation of commissions.

      At work AW Recovery does not close individual orders entirely. The entire position, divided into orders, is virtually divided into smaller parts. The EA closes individual orders in parts, closing a part of an order requires a smaller amount of generated profit, as well as a smaller amount of averaging orders required to open. It is the work with partial closure that allows you to restore positions more safely.


      The current group is the virtually selected part to close. The current group is determined by the adviser from a losing position (part of a long and short position), as well as averaging orders with which parts of the position will be closed. The data of volumes, number of orders and profits of the current group are displayed in the panel of the current group. Also, using this panel, you can close the current processed group in one click.

      When calculating the group, swaps and commissions of losing and averaging orders are taken into account. Also, if ECN accounts are used by the broker, additional commissions may be charged for partial closing for the entire volume of orders formed as a result of closing a part of orders, that is, for the full balance each time a part is closed. These additional fee calculations can be changed using the " TrueECN_Type_of_account " variable. In case of using an ECN account.

      Use full commission when calculating - This variable controls the type of commission accounting. This accounting is relevant for some types of ECN accounts. For some brokers, when partially closing, the full amount of the commission for the newly formed order is removed.

      That is, if you have an order with a volume of 1 lot and you close a part of 0.01 from it, then the broker will take a commission for the remainder of 0.99, since he will calculate this volume as a new order.


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

      If your account does not account for this additional volume, then the variable should be set to false. In the default settings, accounting for the full volume of commissions for partial closure is disabled, that is, everything works like for most types of accounts.


      9. Notification settings.

      AW Recovery can send three types of notifications, these are

      • Alerts.
      • Sending an email.
      • Sending push notifications to the mobile version of the trader's terminal.

      Notifications are sent in the following cases:

      • The adviser exits the standby mode, the beginning of the restoration of the position.
      • Completion of recovery, the moment of closing the last part of the position.

      You can enable or disable the sending of notifications in the input settings, the variable "Notifications at launch and end of recovery".


      • In order to enable sending notifications to e-mail, you should not only enable the corresponding variable in the Expert Advisor, but also make the appropriate settings in the terminal itself. To do this, you need to go through the "Tools" tab in the options menu (Or press Ctrl + O), in this menu there is an Email tab, in which you already need to specify the appropriate values. This menu has detailed help when you click on the corresponding button in the window.


      • In order to enable alerts, you need to check the corresponding box in the general settings window of the adviser



      • In order to set up push notifications in addition to the installed MetaTrader application, you need to make a couple of settings. To do this, you need to go through the "Tools" tab in the options menu (Or press Ctrl + O), in this menu there is a Notifications tab, in which you already need to specify the corresponding MetaQuotes ID value taken from your MetaTrader application


      Attention!

      Notifications will be sent using the method that is connected to the trader.

      If all three notification methods are connected, then AW Recovery will send notifications in all possible ways.


      10. Identifiers and their change.

      The EA identifies orders in two groups, these are 

      • A group of lockable orders, that is, all those orders that the adviser will restore and close in parts
      • A group of averaging orders, that is, those orders with which the EA will restore orders from the group of locked ones.

      Locked orders are those positions that "AW Recovery" will interact with, regulated by the "MagicNumbers group for recovery" variable. You can choose to work with different groups of orders:

      • "All orders on the same symbol" when choosing this option AW Recovery will process absolutely all orders opened on the same symbol asAW Recovery.
      • "Manual opened orders on same symbol" selection of this option means that AW Recovery will only process those symbol orders whose MagicNumber is equal to that used in AW Recovery and those orders whose MagicNumber is equal to "0", i.e. manually opened orders. Thus, manual orders opened using the AW Recovery panel will be considered as being processed by the EA. The group of orders opened through the panel will be determined depending on the selected setting "Open Average orders via Panel"
      • "Same Magic Numbers on same Symbol" this option to work with selected MagicNumbers. That is AW Recovery will process only those orders of the current symbol, MagicNumbers of which are entered into the variableMagicNumbers for recovery (sep by comma ",").

      If you need to restore the drawdown made by a certain Expert Advisor or a group of Expert Advisors, use the option of working with certain MagicNumbers. To choose to work with specific MagicNumberenter them Magic into a variable "MagicNumbers for recovery (sep by comma ",")". In this case, AW Recovery EA will only recover the loss of Expert Advisors that have made a drawdown on the account. To restore an order opened manually in this variable, use the value "0".

      If there is a specific order that, in the opinion of the trader, should be processed first of all, regardless of its complexity, then this can be adjusted with the "First ticket for recovery (o-not used)" variable. In this case, enterthe order ticket that will 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 built-in functionality to determine which orders will be processed first. Adjusted by the variable "What orders to start from".That is AW Recovery will try to close either the hardest or easiest orders first.

      How to get ahead of the best option in a variable"What orders to start from"?

      In case of large position volumes, to accelerate the reduction of swap accrual, the option "Start with easy to close orders" will be more correct. Since in this case AW Recovery EA will process first the easiest to close orders. That is, the processing order will begin with the partial closing of orders, the loss on the minimum volume of which is the least.

      If a small amount of positions can sometimes be relevant option "Start with hard to close orders". In this case, first of all the worst elements of a losing position have been processed. With this choice, there is a possibility of closing the entire position in the TP. That is, the adviser will first of all close those orders, the processing complexity of which is the highest. That is, to carry out a partial closure in the first place of those orders, the loss on the minimum volume of which is the largest.

      Averaging orders AW Recovery are regulated by Magic Number orders. In the variable "MagicNumber of average orders (Should be unique)" - Enter a unique number to identify recovery orders. In order for AW Recovery orders did not intersect with the orders of other advisers.

      In some situations, it may be relevant to change the strategy, in such cases, you can change the identifiers "MagicNumber of average orders (Should be unique)" and process the old recovery orders along with the rest of the losing position as part of the new recovery strategy.

      How AW Recovery recognizes his own and other people's orders?

      Orders opened AW Recovery are perceived as their own, all other orders are perceived as strangers. To close losing orders, the EA uses profit only from its own orders.

      If in the course of work you change MagicNumber in a variable"MagicNumber of average orders (Should be unique)", then the orders opened before that will become for AW Recovery strangers, and the program will block them.

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


      Buy AW Recovery EA right now:


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


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


      AW Trading Software

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