The GetLastError() function return codes. Error code constants defined at stderror.mqh file. To print text messages use ErrorDescription() function defined at stdlib.mqh file.
GetLastError() 関数は、コードを返します。stderror.mqh ファイルで定義されているエラー コード定数。メッセージをテキストを出力するには、stdlib.mqh ファイルで定義されている ErrorDescription() 関数を使用します。
Error codes returned from trade server.
トレード サーバーから返されるエラーコード。
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 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 order 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 open and pending orders has reached the limit set by the broker. 保有中と待機中のオーダー量(ロット数)がブローカーによる設定限度に達しています。 |
ERR_TRADE_HEDGE_PROHIBITED | 149 | An attempt to open a position opposite to the existing one when hedging is disabled. 逆張りするときに既存のものと反対のポジションを開く行為は無効です。 |
ERR_TRADE_PROHIBITED_BY_FIFO | 150 | An attempt to close a position contravening the FIFO rule. FIFO規則(先入れ先出し)に違反しているポジションを閉じる試みです。 |
MQL4 run time error codes
MQL4実行中のエラーコード。
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_CALL_STACK | 4003 | No memory for function call stack. 関数を呼び出してスタックするメモリがありません。 |
ERR_RECURSIVE_STACK_OVERFLOW | 4004 | Recursive stack overflow. 再帰スタックのオーバーフローです。 |
ERR_NOT_ENOUGH_STACK_FOR_PARAM | 4005 | Not enough stack for parameter. パラメータのための十分なスタックがありません。 |
ERR_NO_MEMORY_FOR_PARAM_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 string. 文字列が長すぎます。 |
ERR_REMAINDER_FROM_ZERO_DIVIDE | 4012 | Remainder from zero divide. ゼロ除算の剰余です。 |
ERR_ZERO_DIVIDE | 4013 | Zero divide. ゼロ除算です。 |
ERR_UNKNOWN_COMMAND | 4014 | Unknown command. 不明なコマンドです。 |
ERR_WRONG_JUMP | 4015 | Wrong jump (never generated error). 間違ったジャンプです。(エラーは発生していません) |
ERR_NOT_INITIALIZED_ARRAY | 4016 | Not initialized array. 配列が初期化されてません。 |
ERR_DLL_CALLS_NOT_ALLOWED | 4017 | DLL calls are not allowed. DLL呼び出しが許可されてません。 |
ERR_CANNOT_LOAD_LIBRARY | 4018 | Cannot load library. ライブラリを読み込むことができません。 |
ERR_CANNOT_CALL_FUNCTION | 4019 | Cannot call function. 関数を呼び出すことができません。 |
ERR_EXTERNAL_CALLS_NOT_ALLOWED | 4020 | Expert function calls are not allowed. エキスパート関数の呼び出しが許可されてません。 |
ERR_NO_MEMORY_FOR_RETURNED_STR | 4021 | Not enough memory for temp string returned from function. 関数から返される一時文字列のための十分なメモリがありません。 |
ERR_SYSTEM_BUSY | 4022 | System is busy (never generated error). システムがビジー状態です。(エラーは発生していません) |
ERR_INVALID_FUNCTION_PARAMSCNT | 4050 | Invalid function parameters count. 無効な関数のパラメーター カウントです。 |
ERR_INVALID_FUNCTION_PARAMVALUE | 4051 | Invalid function parameter value. 無効な関数のパラメータ値です。 |
ERR_STRING_FUNCTION_INTERNAL | 4052 | String function internal error. 文字列関数の内部エラーです。 |
ERR_SOME_ARRAY_ERROR | 4053 | Some array error. いくつかの配列エラーです。 |
ERR_INCORRECT_SERIESARRAY_USING | 4054 | Incorrect series array using. 間違った直列配列を使用しています。 |
ERR_CUSTOM_INDICATOR_ERROR | 4055 | Custom indicator error. カスタム インディケーターのエラーです。 |
ERR_INCOMPATIBLE_ARRAYS | 4056 | Arrays are incompatible. 配列に互換性がありません。 |
ERR_GLOBAL_VARIABLES_PROCESSING | 4057 | Global variables processing error. グローバル変数の処理にエラーがあります。 |
ERR_GLOBAL_VARIABLE_NOT_FOUND | 4058 | Global variable not found. グローバル変数が見つかりません。 |
ERR_FUNC_NOT_ALLOWED_IN_TESTING | 4059 | Function is not allowed in testing mode. テストモードで関数が許可されてません。 |
ERR_FUNCTION_NOT_CONFIRMED | 4060 | Function is not confirmed. 関数が確認できません。 |
ERR_SEND_MAIL_ERROR | 4061 | Send mail error. メール送信エラーです。 |
ERR_STRING_PARAMETER_EXPECTED | 4062 | String parameter expected. 文字列パラメータが必要です。 |
ERR_INTEGER_PARAMETER_EXPECTED | 4063 | Integer parameter expected. 整数パラメータが必要です。 |
ERR_DOUBLE_PARAMETER_EXPECTED | 4064 | Double parameter expected. 浮動小数点数パラメータが必要です。 |
ERR_ARRAY_AS_PARAMETER_EXPECTED | 4065 | Array as parameter expected. 配列パラメータが必要です。 |
ERR_HISTORY_WILL_UPDATED | 4066 | Requested history data in updating state. 要求された履歴データが更新中状態です。 |
ERR_TRADE_ERROR | 4067 | Some error in trading function. いくつかのトレード関数でのエラーです。 |
ERR_END_OF_FILE | 4099 | End of file. ファイルの終りです。 |
ERR_SOME_FILE_ERROR | 4100 | Some file error. いくつかのファイルのエラーです。 |
ERR_WRONG_FILE_NAME | 4101 | Wrong file name. 間違ったファイル名です。 |
ERR_TOO_MANY_OPENED_FILES | 4102 | Too many opened files. 開いているファイルが多すぎます。 |
ERR_CANNOT_OPEN_FILE | 4103 | Cannot open file. ファイルを開くことができません。 |
ERR_INCOMPATIBLE_FILEACCESS | 4104 | Incompatible access to a file. 互換性のないファイルにアクセスしました。 |
ERR_NO_ORDER_SELECTED | 4105 | No order selected. 注文が選択されていません。 |
ERR_UNKNOWN_SYMBOL | 4106 | Unknown symbol. 不明な通貨ペアです。 |
ERR_INVALID_PRICE_PARAM | 4107 | Invalid price. 無効な価格です。 |
ERR_INVALID_TICKET | 4108 | Invalid ticket. 無効なチケットです。 |
ERR_TRADE_NOT_ALLOWED | 4109 | Trade is not allowed. Enable checkbox “Allow live trading” in the expert properties. トレードが許可されてません。エキスパート プロパティの “Allow live trading” チェックボックスにチェックを入れてください。 |
ERR_LONGS_NOT_ALLOWED | 4110 | Longs are not allowed. Check the expert properties. ロング(買い)が許可されていません。エキスパート プロパティをチェックしてください。 |
ERR_SHORTS_NOT_ALLOWED | 4111 | Shorts are not allowed. Check the expert properties. ショート(売り)が許可されていません。エキスパート プロパティをチェックしてください。 |
ERR_OBJECT_ALREADY_EXISTS | 4200 | Object exists already. オブジェクトが既に存在しています。 |
ERR_UNKNOWN_OBJECT_PROPERTY | 4201 | Unknown object property. 不明なオブジェクトのプロパティです。 |
ERR_OBJECT_DOES_NOT_EXIST | 4202 | Object does not exist. オブジェクトが存在しません。 |
ERR_UNKNOWN_OBJECT_TYPE | 4203 | Unknown object type. 不明なオブジェクト型です。 |
ERR_NO_OBJECT_NAME | 4204 | No object name. オブジェクトの名前がありません。 |
ERR_OBJECT_COORDINATES_ERROR | 4205 | Object coordinates error. オブジェクトの座標エラーです。 |
ERR_NO_SPECIFIED_SUBWINDOW | 4206 | No specified subwindow. 指定されたサブウィンドウがありません。 |
ERR_SOME_OBJECT_ERROR | 4207 | Some error in object function. いくつかのオブジェクト関数でエラーです。 |