When using advisors, various unpleasant situations can arise related to both the problem of the advisor and other external factors. The loss on transactions is not always a problem for the advisor code, and may be associated both with the terminal and with the correct operation of the program itself. Examples of such errors: the order execution price does not correspond to the stated one, the order is not opened, etc. Below we look at examples of the most common errors of advisers and analyze the options for eliminating them.
Advisor errors: how to find and fix a problem
There are two ways to find errors in the work of the adviser. The first is to see information in the transaction log. The platform has a “Journal” tab, where the history of open positions and errors with an indication of the code is stored. The second way is more difficult – you need to find the code in the log files. Information in files (located in the Logo folder) is placed in text format, which makes it difficult to find the desired string. In the Journal, visual errors are much simpler.
The most common error codes and their decoding:
- 4, 146. These are errors indicating a problem with the server. It may be overloaded or the robot sends a request to the broker before the connection with the server is established. It is logical that orders are not executed. To eliminate we check the connection to the server, the speed of data transfer. And if the speed is high, the connection is there, then we overload the platform and the computer. If the speed is low, then we contact support of the broker.
- 129. Error matching the opening price of the position and the real market price. Appears when the adviser tries to open an order at the time of high volatility, while the price has already changed. It happens that this is a mistake of the advisor himself and you need to check the code: the purchase should occur at Price Ask, the sale at Price Bid.
- 130. Error placing a stop order. Occurs when the minimum distance rule set by the broker is violated. Corrected by making adjustments to the minimum allowed distance of the stop in the settings.
- 131. Wrong volume of the lot that the adviser is trying to work with. The error occurs when the broker has restrictions on the minimum and maximum lot volume, corrected by adjusting the settings.
- 133. Error trading on a given asset. There are several reasons: the adviser tries to open a deal at the weekend, there are restrictions on the part of the broker, etc.
- 134. An advisor error occurs when there is not enough money to open a transaction in the amount specified by the code. Solution: either replenish the deposit, or change the settings of the adviser.
- 135. The code is similar to the error 129. It appears due to the discrepancy between the real price and the requested. It occurs at the time of volatility due to requotes and slippage. Solution: in the Slipage line, we increase the admissible slippage parameter without sending a second request.
- 148. An advisor error occurs when the maximum number of set pending orders is exceeded. Occurs at the grid. Solution: remove extra orders and set the parameter in the settings in accordance with the requirements of the broker.
- 4017. There is no launch of the DLL file, which is a kind of protection of the adviser from hacking. Solution: allow the call to this file in the platform in the “Expert Advisors” section.
This is only part of the errors, the number of which is much more. But you can fix them on your own. There are questions – ask them in the comments.