Mql4 Error Codes
Contents |
Error Codes Styles of Indicator Lines Types and Properties of Graphical Objects Sound Files MessageBox() Return Codes MarketInfo() Identifiers List of Programs Upgrade mql4 error 4109 to MetaTrader 5 Book in One File Download it -
Mql4 Error Code 5004
2 Mb Error Codes GetLastError() - the function that returns codes of error. Code constants of errors mql4 error 4073 are determined in stderror.mqh file. To draw the text messages use the ErrorDescription() function described in the stdlib.mqh file. Error codes returned from a trade server
Mql4 Error 130
or client terminal: Constant Value Description ERR_NO_ERROR 0 No error returned. ERR_NO_RESULT 1 No error returned, but the result is unknown. ERR_COMMON_ERROR 2 Common error. ERR_INVALID_TRADE_PARAMETERS 3 Invalid trade parameters. ERR_SERVER_BUSY 4 Trade server is busy. ERR_OLD_VERSION 5 Old version of the client terminal. ERR_NO_CONNECTION 6 No connection with trade server. ERR_NOT_ENOUGH_RIGHTS 7 Not mql4 error 4051 enough rights. ERR_TOO_FREQUENT_REQUESTS 8 Too frequent requests. ERR_MALFUNCTIONAL_TRADE 9 Malfunctional trade operation. ERR_ACCOUNT_DISABLED 64 Account disabled. ERR_INVALID_ACCOUNT 65 Invalid account. ERR_TRADE_TIMEOUT 128 Trade timeout. ERR_INVALID_PRICE 129 Invalid price. ERR_INVALID_STOPS 130 Invalid stops. ERR_INVALID_TRADE_VOLUME 131 Invalid trade volume. ERR_MARKET_CLOSED 132 Market is closed. ERR_TRADE_DISABLED 133 Trade is disabled. ERR_NOT_ENOUGH_MONEY 134 Not enough money. ERR_PRICE_CHANGED 135 Price changed. ERR_OFF_QUOTES 136 Off quotes. ERR_BROKER_BUSY 137 Broker is busy. ERR_REQUOTE 138 Requote. ERR_ORDER_LOCKED 139 Order is locked. ERR_LONG_POSITIONS_ONLY_ALLOWED 140 Long positions only allowed. ERR_TOO_MANY_REQUESTS 141 Too many requests. ERR_TRADE_MODIFY_DENIED 145 Modification denied because an order is too close to market. ERR_TRADE_CONTEXT_BUSY 146 Trade context is busy. ERR_TRADE_EXPIRATION_DENIED 147 Expirations are denied by broker. ERR_TRADE_TOO_MANY_ORDERS 148 The amount of opened and pending orders has reached the limit set by a broker. MQL4 run time error codes: Constant Value Description ERR_NO_MQLERROR 4000 No error. ERR_WRONG_FUNCTION_POINTER 4001 Wrong function pointer. ERR_ARRAY_INDEX_OUT_OF_RANGE 4002 Array index is out of range. ERR_NO_MEMORY_FOR_FUNCTION_CALL_STACK 4003 No memory for function call stack. ERR_RECU
Return Codes Trade Server Return CodesCompiler WarningsCompilation ErrorsRuntime Errors Trade Server Return Codes GetLastError() - returns error codes. Error codes are defined in stderror.mqh. To
Mql4 Error 5002
print the error description you can use the ErrorDescription() function,
Mql4 Error 4108
defined in stdlib.mqh. Example: #include
To print text messages use the ErrorDescription() function defined in the stdlib.mqh file. The http://www.iexpertadvisor.com/metatrader-4-0-error-codes/ following table lists the Error codes returned from the trade server. Constant Value Description ERR_NO_ERROR 0 No error returned. ERR_NO_RESULT 1 No error returned, but https://www.ea-coder.com/expert-advisor-error-message-codes-on-chart/ the result is unknown. ERR_COMMON_ERROR 2 Common error. ERR_INVALID_TRADE_PARAMETERS 3 Invalid trade parameters. ERR_SERVER_BUSY 4 Trade server is busy. ERR_OLD_VERSION 5 Old version of the mql4 error client terminal. ERR_NO_CONNECTION 6 No connection with trade server. ERR_NOT_ENOUGH_RIGHTS 7 Not enough rights. ERR_TOO_FREQUENT_REQUESTS 8 Too frequent requests. ERR_MALFUNCTIONAL_TRADE 9 Malfunctional trade operation. ERR_ACCOUNT_DISABLED 64 Account disabled. ERR_INVALID_ACCOUNT 65 Invalid account. ERR_TRADE_TIMEOUT 128 Trade timeout. ERR_INVALID_PRICE 129 Invalid price. ERR_INVALID_STOPS 130 Invalid stops. ERR_INVALID_TRADE_VOLUME 131 Invalid trade volume. mql4 error code ERR_MARKET_CLOSED 132 Market is closed. ERR_TRADE_DISABLED 133 Trade is disabled. ERR_NOT_ENOUGH_MONEY 134 Not enough money. ERR_PRICE_CHANGED 135 Price changed. ERR_OFF_QUOTES 136 Off quotes. ERR_BROKER_BUSY 137 Broker is busy. ERR_REQUOTE 138 Requote. ERR_ORDER_LOCKED 139 Order is locked. ERR_LONG_POSITIONS_ONLY_ALLOWED 140 Long positions only allowed. ERR_TOO_MANY_REQUESTS 141 Too many requests. ERR_TRADE_MODIFY_DENIED 145 Modification denied because order too close to market. ERR_TRADE_CONTEXT_BUSY 146 Trade context is busy. MQL4 run time error codes Constant Value Description ERR_NO_MQLERROR 4000 No error. ERR_WRONG_FUNCTION_POINTER 4001 Wrong function pointer. ERR_ARRAY_INDEX_OUT_OF_RANGE 4002 Array index is out of range. ERR_NO_MEMORY_FOR_FUNCTION_CALL_STACK 4003 No memory for function call stack. ERR_RECURSIVE_STACK_OVERFLOW 4004 Recursive stack overflow. ERR_NOT_ENOUGH_STACK_FOR_PARAMETER 4005 Not enough stack for parameter. ERR_NO_MEMORY_FOR_PARAMETER_STRING 4006 No memory for parameter string. ERR_NO_MEMORY_FOR_TEMP_STRING 4007 No memory for temp string. ERR_NOT_INITIALIZED_STRING 4008 Not initialized string. ERR_NOT_INITIALIZED_ARRAYSTRING 4009 Not initialized string in array. ERR_NO_MEMORY_FOR_ARRAYSTRING 4010 No memory for array string. ERR_TOO_LONG_STRING 4011 Too long stri
on MT4 charts when an error occurs during the open, close or modification phase of an order. If you see a message like ‘oe131’ on your chart when a new trade was supposed to be opened, you’ll know that an error has occurred. Types of error message codes Error message codes always start with two letters followed by an error code number. The error codes I use are the same as those used in the MQL4 programming language and are explained in detail on the MQL4 documentation page. Error codes may start with oe, me or ce. oe stands for "open error", me stands for "modify error", and ce stands for "close error". When an error occurs during trade open Take our previous example oe131. Now we know that it indicates an error during a trade open, with the code 131. If you look at the full list of error code descriptions, this one means "invalid trade volume", which alerts us to check the money management settings that we have set for the Expert Advisor. This kind of error appears when a lot size is zero, if it is too small or if it is too big, because all brokers have lot size limitations. Some do not allow the lot size to be smaller than 0.1 while others allow lot sizes as low as 0.01. This varies among different brokers and different account types. Usually Expert Advisors from EA Coder fix the lot size according to the broker limitations, but exceptions may apply because not all brokers report the correct limitation values for the EAs. An example of this is a broker reporting the minimum allowed lot size to be 0.01 while in reality it is actually 0.1. In a case like this, if you to set the EA to use a lot size somewhere between 0.01 and 0.09 it will fail to place orders as it won’t be able to fix the lot size because of it being reported incorrectly. Then you will get the oe131 error message printed on the chart. Another example would be to get the oe133 error. This stands as "Trade is disabled" and it means that the broker does not allow to trade that pair. If this error appears even when customer tries to open trade manually on the same chart, then MT4 EA should be attached to a similar pair with the suffix. For example if you get this error on EURUSD, please look for pair