DESCRIPTION OF THE INPUT VARIABLES OF THE AW RECOVERY EXPERT WITH COMMENTS

15 June 2022, 17:10
AW Trading Software Limited
1
3 218


The input variables are divided into sections:

The main settings sections - the parameters in these sections are best set up individually, as these variables are marked for risk management and can vary greatly depending on the instrument used, volatility, loss volume, and so on

  • ORDERS TO RECOVERY SETTINGS - A section that determines which orders the EA will work with, and whether Recovery will lock the position.
  • LAUNCH SETTINGS - The section responsible for the parameters for starting the recovery process, when to start working and disabling other windows.
  • TAKEPROFIT AND PARTIAL RECOVERY - Section containing settings for closing parts of a losing position. That is, settings for how the profit from retracement orders will be used to restore the position.
  • RECOVERY GRIDS AND AVERAGE ORDERS - A section containing grid settings and aggressiveness of retracement orders. That is, the setting   withdrawals and types of restoring orders and   steps between them.

Secondary settings - the parameters in these sections are responsible for graphics, standard protection parameters, as well as deep trend filtering settings.

  • PROTECTION SETTINGS - Section of standard settings for slippage, spread, etc.  
  • GRAPHICS SETTINGS - Section for setting the size and display of panels, and the TP zone.  
  • AW TREND PREDICTOR FILTERING - Section for setting the built-in trend filter.  


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

A complete description and recomendations of setting up, launching, testing and functionality of the Expert Advisor is located here: https://www.mql5.com/en/blogs/post/749585

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


Input variables:

ORDERS TO RECOVERY SETTINGS

What orders to start from - A variable that determines which orders will be processed by the EA in the first place. That is, the adviser will try to close either the most complex or the simplest orders in the first place. The user can choose where to start the adviser, from the simplest or from the most complex. The choices are:

    • Start with easy to close orders - Close the easiest to close orders first. That is, the processing order will begin with the partial closing of orders, the loss on the minimum volume of which is the least. It may be relevant for large position volumes to accelerate the reduction of swap accrual.
    • Start with hard to close orders - Close orders with the highest processing difficulty first. 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. When using this mode, the probability of closing the entire position in the TP is higher, due to the processing of its worst elements in the first place.

MagicNumbers group for recovery - A variable that determines which orders the EA will be able to interact with, where:

    • All orders on same symbol - The EA will process absolutely all orders opened on the same symbol as "AW recovery" .
    • Manual opened orders on the same symbol - The EA will only process those symbol orders whose MagicNumber is equal to what is used in "AW Recovery" and those orders whose MagicNumber is equal to "0", that is, orders opened manually.
    • Same MagicNumbers on same Symbol - The EA will only process those orders of the current symbol, the MagicNumber of which is used in the same "AW recovery". That is, using this mode, you can restore individual Expert Advisors, continuing to use a pair with other order identifiers.

MagicNumbers for recovery (sep by comma ",") - Enter the MagicNumber that needs to be restored, if you need to work with different MagicNumbers, enter them separated by commas, without using spaces. " AW Recovery EA" will recover the loss of the Expert Advisor that has made a drawdown. To restore an order opened manually in this variable, use the value " 0 ".

First ticket for recovery (o-not used) - Order ticket 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" .

Use locking - Use or not use locking. If this variable is set to "On", then the EA will maintain the position in the lock, that is, equalize the volumes of buys and sells to prevent the loss from increasing and fix the position in a given position for further recovery. It works not only at startup, but also during processing. If you enable this variable, you should limit the work of other algorithms that process the same orders as "AW Recovery" to avoid possible conflicts between algorithms.

Delete SL and TP - When using this variable, the EA will delete all TakeProfit, StopLoss set manually or by other algorithms, the IDs of which refer to the ID of the position being processed, at startup.



LAUNCH SETTINGS

Type of launch - A variable that defines the type of launch of the Expert Advisor, where:
    • Instant start - Start at the moment the adviser is turned on. This means that the EA will start processing orders at the moment of initialization.
    • Start at drawdown in percent - Start when the drawdown is reached in percent. This means that the EA will analyze processed orders from the moment of initialization, but will be able to start trading only when the drawdown from processed orders reaches a certain percentage of the deposit volume. Drawdown volume is changed in the variable "Drawdown in percentage or in money to Launch".
    • Start at drawdown in money - Start upon reaching drawdown in money. This means that the EA will analyze the processed orders from the moment of initialization, but will be able to start trading only when the drawdown from the processed orders reaches a certain amount in the trader's deposit currency. Drawdown volume is changed in the variable "Drawdown in percentage or in money to Launch".
Drawdown in percentage or in money to Launch - A variable that only works in drawdown launch modes. Enter a value depending on the selected type of launch during drawdown. Takes into account the drawdown only from those orders that are processed by the adviser   "AW Recovery" which makes it easier to use with individual EAs and strategies.
    • In the "Start_at_drawdown_in_percent" mode - the variable regulates a certain amount of drawdown as a percentage of the deposit, upon reaching which the EA will begin to restore a losing position. For example, if it is necessary to use recovery in case of a drawdown from processed orders of 35 and a half percent, then you should enter the value "35.50" in "Start_at_drawdown_in_percent".
    • In the "Start_at_drawdown_in_money" mode - the variable regulates a certain amount of drawdown in the deposit currency, upon reaching which the EA will begin to restore the unprofitable position. For example, if you need to use recovery in case of a loss from processed orders of 500 deposit units, then you should enter in "Start_at_drawdown_in_percent" value is "500".

Disable other EAs at Launch - Module for disabling other advisers, where:

    • Do not disable other advisors - Do not disable other windows;
    • Disable advisors on same Symbol - Disable all windows on the same symbol;
    • Disable advisors on all Symbols - Disable all windows on all symbols.

This function is executed only once, when the Expert Advisor is launched or exited from sleep mode. Using "AW Recovery" it is necessary to avoid possible conflicts between other algorithms and "AW Recovery",for this you should turn off other advisers at the time of starting work "AW recovery". This function is used to automate this action. The EA will either close all windows of the current symbol except its own window, or all windows on all symbols except its own window, or "AW Recovery" will not disable other windows. This is important to consider when arranging algorithms in the terminal. Unfortunately, by means of MQL4 it is impossible to determine if an Expert Advisor belongs to a certain window, so after completing its work "AW Recovery" will not open previously closed windows, you will need to do it again manually.

Close profit at Launch - When using this variable, the EA will start its work by closing all profitable processed orders and, using the released profit, will close unprofitable orders.

Delete Pending Orders at Launch - When using this variable, the EA will delete all pending orders at startup, the IDs of which refer to the ID of the position being processed.



TAKEPROFIT AND PARTIAL RECOVERY

Part to close from a loss-making position - Part of the loss, which will be closed from orders of each type when the position is partially closed. Determines what volume will be closed using profit from restoring orders. Measured in lots. For better performance of the Expert Advisor, this variable should 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.

TakeProfit in money for partial close - TP for the current group of orders. The profit from restoring orders is used, as well as the loss, which is a part of the volume of "Part to close from a loss-making position" lots from each type of orders from a losing position.

Allow overlap after number of orders - Additional TP for the first and last orders in the grid, enter the value after which this function will be active. The use of additional TP 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. When closing the last part of a position, the EA does not use this function.

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".



RECOVERY GRIDS AND AVERAGE ORDERS

Trend filtering for average orders - Averaging orders can be opened both with a specified step from the boundaries of the zones and each other, and using additional filtering. This variable controls the EA's trend filters. The EA will open orders in accordance with the given strategy only if there is a corresponding trend determined by one of the indicators. When using the "BullsBears Candles" filter, the EA   "AW Recovery"   analyzes the indicator readings on the current timeframe, so the choice of timeframe affects the signal. If the "AW Trend Predictor" filter is used, the EA will analyze the indicator readings for the selected timeframe in the "AW Trend Predictor timeframe" variable. In total, you can choose one of three settings options:

      • BullsBears Candles Filtering - Open averaging orders using BulsBears Candles, a custom indicator of reversal candle patterns that is built into the EA.
      • AW Trend Predictor Filtering - Using trend filtering with the help of the AW Trend Predictor trend indicator built into the EA.
      • Simple grids - Opening retracement orders using classic order grids without using trend filtering. The most aggressive mode of opening restoring orders.

Allowed types of average orders - Valid types of averaging orders that the EA will open, where:

    • Buy and Sell orders - Ability to open OP_BUY and OP_SELL types of averaging orders
    • Buy orders - Ability to open only OP_BUY type of averaging orders
    • Sell orders - Ability to open only OP_SELL type of averaging orders
    • Without opening - Do not open averaging orders, orders will be opened by another EA (Magic and order comment must match for correct identification)

Volume of average order - The volume of the first restoring order in the basket is measured in lots.

Multiplier to volume - Multiplier for restoring orders. 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.

Step for average - The variable regulating the minimum step between restoring orders is measured in points. In the case of working without trend filtering, it is a step to open orders. In the case of using a trend filter, this is the minimum distance after which the system will wait for a signal from the trend filtering system to open a subsequent order.

multiplier to step - Multiplier for the step of restoring orders. Using this multiplier, you can more flexibly approach the calculation of order volumes using the dynamic order grid step.



PROTECTION SETTINGS

One Opened Order per Bar filtering  - A variable that limits the possibility of opening more than one order per candle. If you select "Off", the EA will open new averaging orders, as soon as the signal for opening occurs, more averaging orders will be opened. If you select the "On" option, the adviser will open only one order in one direction per candle. That is, if you select "On", the number of orders will be limited, this option is safer in case of sharp price fluctuations.

multidirectional trading - A variable that limits the possibility of opening averaging orders in two directions at the same time. When "On" is selected - "AW Recovery" will be able to trade in both directions if there are conditions for this. If "Off" - no, that is, the adviser will only trade in one direction. That is, if there are already open averaging orders, then the adviser will be able to trade along the current trend, and not just against it.

Maximum slippage in points - Maximum allowable slippage in points for opening and closing orders.

Maximum spread in points - The maximum allowable spread for opening orders. Measured in points.

Maximum volume of average order - Maximum volume for one restoring order. Measured in lots.

Maximum number of average orders - The maximum allowable number of restoring orders of the same type.

MagicNumber of average orders (Should be unique) - Identifier for restoring orders. Magic number for averaging orders must be unique. To order "AW Recovery EA" did not intersect with the orders of other Expert Advisors. In some situations, it may be necessary to change the strategy, in such cases, you can change the identifiers and process the old recovery orders along with the rest of the unprofitable position within the new recovery strategy.

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 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 amount of the commission for each partial closure.

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.

Notifications at launch and end of recovery - Enable or disable sending notifications when the recovery starts and when it ends. When enabled, three types of notifications will be sent: push notifications, mails and alerts.



GRAPHICS SETTINGS

Color Cheme for Panels - Choosing the color scheme of the adviser, where:

    • light scheme - Light panel color scheme, more suitable when working on light charts.
    • Dark scheme - Dark panel color scheme, more suitable when working on dark charts.

How closed profit on chart - Type of displaying the profit volume of restoring orders on the chart, where:

    • Not Used - Do not display the volume of closed averaging orders on the chart.
    • Show text on chart - Use the display option as text (used in versions prior to 3.0).
    • Show images on chart - Use the option to display volumes of averaging orders on the chart as images (with a white or black background, depending on the color scheme).

Show Panel - Variation of the display of the advisor panels, where:

    • Do not show Advisor Panel - Do not display advisor panels on the chart.
    • Show panel normal size - Use normal size panels.
    • Show panel big size - Use large panels for high resolution monitors.

    Font size - Adjusting the font size on the advisor panels.

    Show line if possible zone for closures - Display a checkmark indicating the approximate value at which the close probability starts. The TP line is a calculation that is made without taking into account commissions and without taking into account the current market volatility.



    AW TREND PREDICTOR FILTERING

    AW Trend Predictor timeframe - Selecting a timeframe for filtering signals. The entry point is 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.

      • Current - do not use multi-timeframe filtering.
      • options from M1 to 1Month.

    Amplitude AW Trend Predictor   - Adjustment of indicator amplitude. The larger the value, the lower the sensitivity of the indicator signals, the smaller, the greater the sensitivity of the indicator signals (the larger the value = the fewer signals, the smaller the value = more signals).

    Signals of AW Trend Predictor   - Ability to choose to open a new first order (in the basket) only when a new signal is received from the indicator or as soon as the previous ones are closed (more orders).

      • Firs trade by trend direction   - The EA will open new orders immediately after closing the previous ones throughout the entire trend direction.
      • firs trade at trend reverse   - The Expert Advisor will open new orders only when a new signal is received from the indicator. That is, the adviser trades once per signal

    Averaging with Trend Predictor filtering   - Adjustment of averaging after opening the first order in the basket. That is, whether the adviser will be able to average orders opened on the opposite trend.

      • 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.


    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


    Share it with friends: