Mql Ordersend Error 4111
Contents |
Error Codes Styles of Indicator Lines Types and Properties of Graphical Objects Sound
Mql4 Error Codes
Files MessageBox() Return Codes MarketInfo() Identifiers List of Programs mql4 error 4109 Upgrade to MetaTrader 5 Book in One File Download it - 2 Mb mql4 error 130 Error Codes GetLastError() - the function that returns codes of error. Code constants of errors are determined in stderror.mqh file. To draw
Mql4 Error 4073
the text messages use the ErrorDescription() function described in the stdlib.mqh file. Error codes returned from a trade server 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
Mql4 Error Code 5004
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 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_E
Trade Server Return CodesCompiler WarningsCompilation Errors Runtime Errors Runtime Errors The GetLastError() function return last mql4 error 4051 error code, stored in _LastError predefined variable. This value
Mql4 Ordersend Error 130
can be reset using the ResetLastError() function. Error code constants defined at stderror.mqh mql4 error 4108 file. To print text messages use ErrorDescription() function defined at stdlib.mqh file. For convenience, trade errors are additionally listed in the Trade https://book.mql4.com/appendix/errors Server Return Codes section. Runtime errors of mql4-program: Code ID Description 0 ERR_NO_ERROR No error returned 1 ERR_NO_RESULT No error returned, but the result is unknown 2 ERR_COMMON_ERROR Common error 3 ERR_INVALID_TRADE_PARAMETERS Invalid trade parameters 4 ERR_SERVER_BUSY Trade server is busy 5 ERR_OLD_VERSION Old version https://docs.mql4.com/constants/errorswarnings/errorcodes of the client terminal 6 ERR_NO_CONNECTION No connection with trade server 7 ERR_NOT_ENOUGH_RIGHTS Not enough rights 8 ERR_TOO_FREQUENT_REQUESTS Too frequent requests 9 ERR_MALFUNCTIONAL_TRADE Malfunctional trade operation 64 ERR_ACCOUNT_DISABLED Account disabled 65 ERR_INVALID_ACCOUNT Invalid account 128 ERR_TRADE_TIMEOUT Trade timeout 129 ERR_INVALID_PRICE Invalid price 130 ERR_INVALID_STOPS Invalid stops 131 ERR_INVALID_TRADE_VOLUME Invalid trade volume 132 ERR_MARKET_CLOSED Market is closed 133 ERR_TRADE_DISABLED Trade is disabled 134 ERR_NOT_ENOUGH_MONEY Not enough money 135 ERR_PRICE_CHANGED Price changed 136 ERR_OFF_QUOTES Off quotes 137 ERR_BROKER_BUSY Broker is busy 138 ERR_REQUOTE Requote 139 ERR_ORDER_LOCKED Order is locked 140 ERR_LONG_POSITIONS_ONLY_ALLOWED Buy orders only allowed 141 ERR_TOO_MANY_REQUESTS Too many requests 145 ERR_TRADE_MODIFY_DENIED Modification denied because order is too close to market 146 ERR_TRADE_CONTEXT_BUSY Trade context is busy 147 ERR_TRADE_EXPIRATION_DENIED Expirations are denied by broker 148 ERR_TRADE_TOO_MANY_ORDERS The amount of open and pending orders has
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About http://stackoverflow.com/questions/38689063/mql4-error-4111-when-calling-ordersend-method Us Learn more about Stack Overflow the company Business Learn more about hiring http://mql4you.ru/faq/vopros-5.html developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up MQL4 - ERROR 4111 when mql4 error calling OrderSend() method up vote 2 down vote favorite I am trying to place order, but my call to OrderSend() method ( https://docs.mql4.com/trading/ordersend )is failing: 2016.08.01 00:51:09.710 2016.07.01 01:00 s EURUSD,M1: OrderSend error 4111 void OnTick() { if ( OrdersTotal() == 0 ){ int result = OrderSend( NULL, OP_SELL, 0.01, Bid, 5, 0, Bid - 0.002, NULL, 0, 0, clrGreen ); if ( result < 0 mql4 error code ) Print( "Order failed #", GetLastError() ); else Print( "Order success" ); } } Do you know what am I doing wrong please? algorithmic-trading mql4 metatrader4 mql5 share|improve this question edited Aug 4 at 6:41 user3666197 7,85721330 asked Jul 31 at 22:57 YumYumYum 5,83224122215 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted Let's dis-assemble the OrderSend() call first: int result = OrderSend( NULL, // string: _Symbol, OP_SELL, // int: OP_SELL, 0.01, // double: NormalizeLOTs( nLOTs ), Bid, // double: NormalizeDouble( Bid, Digits ), 5, // int: slippagePOINTs, 0, // double: { 0 | NormalizeDouble( aSlPriceTARGET, Digits ) }, Bid-0.002, // double: { 0 | NormalizeDouble( aTpPriceTARGET, Digits ) }, NULL, // string: { NULL | aBrokerUnguaranteedStringCOMMENT }, 0, // int: { 0 | aMagicNUMBER }, 0, // datetime: { 0 | aPendingOrderEXPIRATION }, clrGreen // color: { clrNONE | aMarkerCOLOR } ); For one's further peace-of-mind, one ought always normalise all the values, that have some restrictive handling on the MQL4-side ( prices + lot ( quantised ) values -- as these are not continuous values in R domain, but rather quantum-stepped: prices: having a 0.00001 or
Автор: palt 3 Фев Что значит 2010.02.01 17:00 MyExpert GBPUSD,M15: OrderModify error 130 почему обычно эта ошибка возникает? Очень много подобных вопросов мне приходит. Поэтому публикую таблицу кодов ошибок. Например посмотрев вышеописанную ошибку error 130 становится понятно, что функция OrderModify пытается изменить стоп-лосс или тейк-профит слишком близко к текущей цене. Коды ошибок GetLastError()— функция, возвращающая коды ошибок. Кодовые константы ошибок определены в файле stderror.mqh. Для вывода текстовых сообщений следует использовать функцию ErrorDescription(), определенную в файле stdlib.mqh. Коды ошибок, возвращаемые торговым сервером или клиентским терминалом: Значение Описание 0 Нет ошибки 1 Нет ошибки, но результат неизвестен 2 Общая ошибка 3 Неправильные параметры 4 Торговый сервер занят 5 Старая версия клиентского терминала 6 Нет связи с торговым сервером 7 Недостаточно прав 8 Слишком частые запросы 9 Недопустимая операция нарушающая функционирование сервера 64 Счет заблокирован 65 Неправильный номер счета 128 Истек срок ожидания совершения сделки 129 Неправильная цена 130 Неправильные стопы 131 Неправильный объем 132 Рынок закрыт 133 Торговля запрещена 134 Недостаточно денег для совершения операции 135 Цена изменилась 136 Нет цен 137 Брокер занят 138 Новые цены 139 Ордер заблокирован и уже