The Expert Advisor helps reduce the account drawdown.
To do this, the losing deal is split into multiple small parts, each of these parts is closed separately.
The EA can interact with other experts. For example, when a certain drawdown is reached, Open Lock can disable the other expert and start working with its orders.
Open lock for MetaTrader 5 is available here
Methods used by the EA
- Locking to prevent a drawdown increase
- Averaging orders used to cover the loss
- Partial closure to reduce the load on deposit
Averaging orders are opened with a small lot so as not to load the deposit.
Profit of these orders is used to partially close the losing position.
Expert Advisor Parameters
- Language - interface language of the control panel
- Magic Number - unique identifier of averaging orders. It must not coincide with the magic numbers of other EAs
- Start work - when to start working
- At startup - right after starting
- By drawdown level - after reaching the drawdown level
- Drawdown in currency - drawdown value in the deposit currency(it must be specified in case 'By drawdown level' is selected)
- Stop another advisors - stop the operation of other experts in the terminal (works only when the drawdown level is reached)
- Not use - disable this feature
- Close chart with same symbol (for single currency advisor's) - close charts of the current symbol. Charts of other symbols will not be closed
- Close all other charts (for multicurrency advisor's) - close other charts to disable the operation of other experts
- Action when the risk limit is reached - actions for critically low level of free margin (action is activated 30 seconds after the drawdown is reached)
- Locking all positions and stop
- Сlose all position and stop
- Equity level in currency - equity level, below which the actions from the previous parameter are triggered (if 0, not used)
- Equity level in percent - drawdown percentage. If higher than 0, and Action when the risk limit is reached - None, the drawdown value will be displayed on the control panel
- Maximal lot in average ord (0-not used) - the maximum lot to be opened by the EA in an averaging order. If 0, the lot size is not limited
- Maximal number average ord in one direction (0-not used) - the maximum number of averaging orders in one direction
- Maximal step (0-not used) - the maximum step (in pips) that can be set between averaging orders. If 0, the step is not limited. This parameter is only used if the dynamic step is enabled
- Settings - how to set the EA parameters
- Use control panel
- Use expert inputs - parameters must be set in the EA inputs. This mode should be used when working with VPS by MetaQuotes
When you start the Expert Advisor, it opens a deal and then tries to close it with a profit.
To open additional market orders, you can use buttons on the control panel.
[v] Fix trall work
[+] - disabled auto switch-off when changing the TF
[v] - fixed calculation future levels, when multiplier 1.0
[v] - a significant increase in the speed of the program
[v] - fix save settings
[+] List of magic orders, which the EA does not take into account in its work
[+] Choice of the type of deals the Expert Advisor will work with
-Buy and Sell (that was before)
[+] Selection of orders to be closed in the first place
- first the distant ones (that was before)
- immediate family first
- first the orders with the largest lot
[+] Run on drawdown
- when the drawdown of the currency by the symbol (was earlier) is reached
- when the drawdown is reached in % by account
- if the specified price crosses above or below the current price
[+] Pause in seconds at closing or full locking of trades at reaching a drawdown (previously the Expert Advisor waited 30 seconds)
[+] If it is necessary to block a large volume, the Expert Advisor will break a trade into parts
[+] Select the time for operation
[+] Stop trading of the Expert Advisor after closing the order grid (parameter Continue trading)
[v] Changed calculation of parameters at high risk
[v] Fixed lot calculation by clicking on i button.
-Added OL API 2.0. This allows you to manage OL from any other EA
-The speed of the Expert Advisor has been increased. On slow VPS will work faster
-Improved automatic trailing stop calculation
-Improved algorithm for calculating high risk levels
-Fixes when Trend protect orders work
-Signal filtering inside one candle
-Fixed work with one order
-Trailing for profitable positions
-Working with other OL
-CPU load indicator (relevant for slow VPS)
-Added automatic calculation of high-risk parameters
-The algorithm for calculating the parameters has been significantly updated
-Calculation and selection of parameters is available before the drawdown of 75%
-The chart displays future levels of opening trades, lots, and the projected loss for recoilless price movement.
-The screen displays information about the actions of the adviser on opening and closing deals
-Information about current drawdown is added to the screen
-All advisor transactions are displayed on the main screen, even if they are not involved in trading
-Calculation of order closing levels has become more accurate
-Updated OLAPI, added new features
-Changed the functionality of the Open Lock panel (previously called the control panel)
- OL API allows you to remotely change any settings of the EA
- OL API allows you to open/close and modify orders
- Added the ability to disable removing of stop levels
- Added the ability to set a range of magic numbers for the EA to ignore. (This allows using multiple strategies on a single currency pair)
- Fixed various bugs from previous versions
- Added a button for manually closing a part of the losing deal, in the case there is a profit.
- Added a button for manually closing the profitable positions of the EA. It can be useful if the deals were opened with large volumes.
- When working with the disabled control panel, the EA's settings are displayed on the chart.
- Fixed calculation of closing levels. The level is calculated more accurately and on any instruments, but it does not take swaps and spreads into account.
- When working with one deal, the EA will store the ticket of the deal in case of a terminal failure.
- Added the ability to set the parameters in the EA settings, without using the control panel. This mode should be used to run the EA on the VPS by MetaQuotes.
- Made corrections to rounding of lots when the multiplier is used.
- Changed the Close Only mode. Buy deals opened by another expert will be used for closing unprofitable Buy deals, sell deals will close unprofitable sell deals.
- Added support for the DrowdownSYL, BalanceAndEquitySYL indicators. They plot a graph of changes in the level of drawdown, balance and equity. They work in the tester and in live trading. (https://www.mql5.com/ru/blogs/post/711734)
- Added comment text when opening orders
- Minimizing and maximizing the panel is now more convenient
- Fixed various visual errors
- Ability to turn off the opening of orders. Then the EA will work only on locking and closing positions. Another EA should open trades
- Ability to limit the maximum number of open orders
Added actions for achieving critical drawdown
- Close all positions and stop
- Close all positions and stop
Disabling other Expert Advisors:
- It is possible to close only the charts with the current symbol
In the control panel:
- Single on/off ratio for the step and for the lot
- Tooltips for all elements
- Moving control panel
- Minimize control panel (double click at the top)
-Added a dynamic step when opening new orders
-Various visual and program changes
-Updated the overview of the adviser
- Disabling other EAs (if another EA has accumulated a drawdown, then Open Lock will turn it off and take the trade on itself)
- Open orders at a specified time (you can specify an interval when there is no news)