AW Recovery System
The Expert Advisor is designed to reduce the account drawdown. The proprietary algorithm locks an unprofitable position, splits it into many parts and closes each part separately.
The use of partial closure allows reducing the losses with a smaller deposit load, which provides a safer work with the losses, unlike the grid strategies that close orders only in whole groups.
How the orders are recovered
- The EA closes other windows of the selected instrument to disable the unprofitable experts (optional).
- The EA blocks the unprofitable position by opening a locking order.
- Then it opens recovery orders to reduce the loss by partially closing the unprofitable orders.
- During the partial closure, the algorithm recovers the least successful orders first. Each unprofitable order is split into several parts, which are closed separately. The recovery orders are opened with a small volume so as not to increase the deposit load.
When run in the strategy tester, the EA opens one demonstration position for testing the recovery feature. For further testing, it is necessary to use the buttons for opening orders located on the EA panel.
- Work_Mode - the EA operation mode, where:
- Work_at_Start - the EA starts its operation as soon as it is launched.
- Work_at_Drawdown - the EA starts its operation only after reaching Dd_Percent_For_Start percents of the deposit drawdown.
- Trend_Filter_Grids - Selection of an additional trend filter for restoring orders.
- Close_Another_Charts - close other windows of the current instrument at the start of the work to disable other experts.
- Dd_Percent_For_Start - percentage of the deposit drawdown to start the EA operation in the Work_at_Drawdown mode.
- Open_Lots - volume of new orders opened using the panel buttons.
- Magic_Number - magic number for recovery orders.
- Slippage - maximum allowable slippage for opening orders.
- Spread_Limit - maximum allowable spread for opening orders.
- Maximum_Order_Size - the maximum volume of recovery orders.
- Maximum_Orders_In_Work - the maximum number of the EA's orders.
- Long_Trades - allow buy trades.
- Short_Trades - allow sell trades.
- Work - allow the EA operation.
- Locking - allow automatic locking of orders.
- One_order_per_bar - Deny opening more than one recovery order per bar.
- Recovery_Start_Lots - volume of the first recovery order.
- Multiplier - multiplier for recovery orders.
- TrailingStart_Money - profit of the order group in the deposit currency to activate the trailing algorithm.
- Step_Grids - step for opening new recovery orders.
- Step_Multiplier - Multiplicator for the step of restoring orders (Step_Grids)
- Part_For_Close - volume of the unprofitable order's part to be closed at a time.
- Use_Take_Profit_Money - enable take profit in money.
- Take_Profit_Money - take profit in the deposit currency.
- ProfitTextWrite - Allow profit from closing order groups on the chart.
- Font_Size - Font size for the advisor panel.
- SAR_Settings, Alligator_Settings, TwoMA_Settings - blocks for setting employees' indicators with additional trend filters when the corresponding value of the variable Trend_Filter_Grids is selected.
- Fixed possible closing errors of the charts.
- Fixed possible errors when deleting pending orders.
- Added the function Close_Profit_At_Start - the adviser at the start of work will close all profitable orders from those (of those that are allowed to be processed) and using the profit from them will block part of the unprofitable.
- Added function Delete_Pendings_At_Start - advisor at the beginning of the work will remove all pending orders with the corresponding identifiers.
- Now when launching, the adviser removes the TakeProfit and StopLoss levels from the processed orders.
- Added a variable to select the type of orders processed (Work_With), where:
All_Trades - Advisor will work with all orders of the instrument.
Manual_Opened - the Expert Advisor will process the orders opened manually (these are orders with Magic = 0, if other Expert Advisors have MagicNumber = 0, then RecoverySystem will perceive them as opened manually)
Same_Magic_Number - Advisor will process only orders with the same MagicNumver as in RecoverySystem EA.
- Added the ability to run an advisor without a graphic block (Show_Panel Variable), which is important for saving resources when using VPS.
- A general optimization of the code was carried out, some operators were rewritten to increase speed and reduce resource consumption.
- Now the Expert Advisor works to bind to a specific Magic_Number, which allows you to restore not tools, but the work of individual Expert Advisors, therefore the drawdown calculation method (Dd_Percent_For_Start) is also corrected - now it is the drawdown of the deposit in percent that was provided by the algorithm with the corresponding Magic_Number on the corresponding tool.
- Added the multiplier of the grid of restoring orders (Step_Multiplier).
- Added three variants of filters for restoring orders (Trend_Filter_Grids).
- Added the function of limiting the number of restorative orders, for one bar there can be only one market order (One_order_per_bar).
- Added the ability to change the font size (Font_Size).