Decoding of errors of advisors by code in the MT4 log
Errors arising in the work of Expert Advisors can be roughly divided into two groups: trading and technical. The reason for trading errors is problems with the construction of the algorithm by which the code was written, problems in the code itself, an error in the trading system. Technical errors are errors due to which the advisor does not start and does not open a single deal. Their code can be found in the lower panel of MT4 “Terminal” in the “Experts” or “Journal” tabs. Some of the errors of Expert Advisors have already been discussed in this review.
Types of Expert Advisors Errors in MT4
- Error 4, 146… Server overload. Appears when the EA tries to open too many trades at the same time (place orders). Most often this “suffers” mesh workers. Without waiting for a response from the server, the robot tries to place new orders, overloading the server. A common mistake for “kitchen” brokers with weak servers. Therefore, they set limits on the minimum transaction time in the market and the frequency of sending signals to the server.
What to do… Reload the platform. Sometimes it helps. Optimize the advisor code or change the broker.
- Error 8, 141. High frequency of requests.
What to do… The same as in the above situation.
- Error 129. Wrong price.
What to do… Most likely, the types of prices are confused – a typical mistake for Expert Advisors and rare for manual opening of deals. A buy deal is opened at the Ask price, closed at the BID price. For sale – the opposite.
- Error 130, 145. Incorrectly set stop loss. There are two possible reasons: the stop loss is mixed up with the take profit, or there are restrictions on the minimum stop size.
What to do… You cannot set a stop above the trade entry point for a long position and below for a short one. For the second reason, check with the broker for the stop length restrictions relative to the price. This is indicated in the offer or trading conditions. This parameter may turn out to be floating – the minimum stop distance relative to the price may increase with the growth of the current volatility.
- Error 131. An error in the volume of the opened trade. There are two reasons: the EA tries to open a deal with a volume greater / less than that provided by the broker (for example, 0.001 lot with a minimum volume of 0.01 lot). Or the problem is in the bitness of the lot (the minimum step is violated).
What to do. Correct the EA code in accordance with the contract specification and the broker’s trading conditions.
- Error 132, 133. The market is closed.
What to do… Wait for the opening, you launched the advisor on the weekend.
- Error 134. Not enough money to open a deal. No money or margin.
What to do… Clarify what leverage is used for trading. Condition 1: 200 on the account does not apply to all assets without exception. For example, for currencies it can really be 1: 200, but for shares – 1:10. All leverage and calculation rules are specified in the specification.
- Error 135-138. Price change. The broker does not open a deal because the specified price does not match the market price. The so-called requotes appear.
What to do… The market has high volatility and the type of execution of transactions does not provide an opportunity to instantly execute an order. Solution options: make money on ECN accounts, avoid trading at a time of high fundamental volatility. Or, in the MT4 settings, increase the slippage length in points.
If the problem is not solved or the code is not in this list, contact the developer of the advisor or ask the support of the developer of the MT platform on the MQL5 website. Please note that there may be minor changes in code numbering due to platform updates and detailing of possible technical issues. Therefore, in case of questions – make screenshots and write comments under the review. We will try to help!