MT4错误代码详解与中文对照表
MT4错误代码主要分为两类:服务器返回的错误代码和MQL4程序运行时的错误代码。了解这些代码的含义有助于投资者更好地判断和处理交易中遇到的问题。以下为详细的中文对照说明。
一、SAXO外汇服务器返回的错误代码
错误代码 / 描SAXO外汇述 / 中文释义
0、1 — no error — 没有错误返回;2 — common error — 一般错误;3 — invalid trade parameters — 交易参数出错;4 — trade server is busy — 交易服务器繁忙;5 — old version of the client terminal — 客户终端软件版本太旧;6 — no connection with trade server — 没有连接交易服务器;7 — not enough rights — 操作权限不够;8 — too frequent requests — 交易请求过于频繁;9 — malfunctional trade operation (never returned error) — 交易操作故障。64 — account disabled — 账户被禁用;65 — invalid account — 无效账户。128 — trade timeout — 交易超时;129 — invalid price — 无效报价;130 — invalid stops — 止损错误;131 — invalid trade volume — 交易量错误;132 — market is closed — 休市;133 — trade is disabled — 禁止交易;134 — not enough money — 资金不足;135 — price changed — 报价发生改变;136 — off quotes — 建仓价过期;137 — broker is busy (never returned error) — 经纪商繁忙;138 — requote — 需要重新报价;139 — order is locked — 订单被锁定;140 — long positions only allowed — 只允许做买入类型操作;141 — too many requests — 请求过多;145 — modification denied because order is too close to market — 过于接近报价,禁止修改;146 — trade context is busy — 交易繁忙;147 — expirations are denied by broker — 交易期限被经纪商取消;148 — amount of open and pending orders has reached the limit — 持仓单数量超过经纪商的规定;149 — hedging is prohibited — 禁止对冲;150 — prohibited by FIFO rules — 受FIFO规则限制。
二、SAXO外汇MQL4运行时的错误代码
错误代码 / 描述 / 中文释义
4000 — no error (never generated code) — 没有错误返回;4001 — wrong function pointer — 函数指针错误;4002 — array index is out of range — 数组越界;4003 — no memory for function call stack — 调用栈导致内存不足;4004 — recursive stack overflow — 递归栈溢出;4005 — not enough stack for parameter — 堆栈参数导致内存不足;4006 — no memory for parameter string — 字符串参数导致内存不足;4007 — no memory for temp string — 临时字符串导致内存不足;4008 — non-initialized string — 字符串变量缺少初始化赋值;4009 — non-initialized string in array — 字符串数组缺少初始化赋值;4010 — no memory for array/' string — 字符串数组空间不够;4011 — too long string — 字符串太长;4012 — remainder from zero pide — 因除数为零导致的错误;4013 — zero pide — 除数为零;4014 — unknown command — 错误的命令;4015 — wrong jump (never generated error) — 错误的跳转;4016 — non-initialized array — 数组没有初始化;4017 — dll calls are not allowed — 禁止调用DLL;4018 — cannot load library — 库文件无法调用;4019 — cannot call function — 函数无法调用;4020 — expert function calls are not allowed — 禁止调用智能交易系统函数;4021 — not enough memory for temp string returned from function — 函数中临时字符串返回导致内存不够;4022 — system is busy (never generated error) — 系统繁忙;4023 — dll-function call critical error — DLL函数调用错误;4024 — internal error — 内部错误;4025 — out of memory — 内存不够;4026 — invalid pointer — 指针错误;4027 — too many formatters in the format function — 过多的格式定义;4028 — parameters count is more than formatters count — 参数计数器越界;4029 — invalid array — 数组错误;4030 — no reply from chart — 图表没有响应。4050 — invalid function parameters count — 参数无效;4051 — invalid function parameter value — 参数值无效;4052 — string function internal error — 字符串函数内部错误;4053 — some array error — 数组错误;4054 — incorrect series array usage — 数组使用不正确;4055 — custom indicator error — 自定义指标错误;4056 — arrays are incompatible — 数组不兼容;4057 — global variables processing error — 全局变量处理错误;4058 — global variable not found — 没有发现全局变量;4059 — function is not allowed in testing mode — 测试模式中函数被禁用;4060 — function is not confirmed — 函数未确认;4061 — send mail error — 发送邮件错误;4062 — string parameter expected — 字符串参数错误;4063 — integer parameter expected — 整数参数错误;4064 — double parameter expected — 浮点参数错误;4065 — array as parameter expected — 数组参数错误;4066 — requested history data is in update state — 刷新历史数据错误;4067 — internal trade error — 交易内部错误;4068 — resource not found — 没有发现资源文件;4069 — resource not supported — 不支持资源文件;4070 — duplicate resource — 重复的资源文件;4071 — custom indicator cannot initialize — 自定义指标没有初始化。4099 — end of file — 文件末尾;4100 — some file error — 文件错误;4101 — wrong file name — 文件名称错误;4102 — too many opened files — 打开文件过多;4103 — cannot open file — 不能打开文件;4104 — incompatible access to a file — 不兼容的文件访问;4105 — no order selected — 没有选择订单;4106 — unknown symbol — 未知的商品名称;4107 — invalid price parameter for trade function — 价格参数无效;4108 — invalid ticket — 报价无效;4109 — trade is not allowed in the expert properties — 禁止交易,请尝试修改智能交易系统属性;4110 — longs are not allowed in the expert properties — 禁止买入类型交易,请尝试修改智能交易系统属性;4111 — shorts are not allowed in the expert properties — 禁止卖出类型交易,请尝试修改智能交易系统属性。4200 — object already exists — 对象已经存在;4201 — unknown object property — 未知的对象属性;4202 — object does not exist — 对象不存在;4203 — unknown object type — 未知的对象类型;4204 — no object name — 对象没有命名;4205 — object coordinates error — 对象坐标错误;4206 — no specified subwindow — 没有指定副图窗口;4207 — graphical object error — 图形对象错误。4210 — unknown chart property — 未知的图表属性;4211 — chart not found — 没有发现主图;4212 — chart subwindow not found — 没有发现副图;4213 — chart indicator not found — 图表中没有发现指标。4220 — symbol select error — 商品选择错误。4250 — notification error — 消息传递错误;4251 — notification parameter error — 消息参数错误;4252 — notifications disabled — 消息被禁用;4253 — notification send too frequent — 消息发送过于频繁。5001 — too many opened files — 文件打开过多;5002 — wrong file name — 错误的文件名;5003 — too long file name — 文件名过长;5004 — cannot open file — 无法打开文件;5005 — text file buffer allocation error — 文本文件缓冲区分配错误;5006 — cannot delete file — 无法删除文件;5007 — invalid file handle (file closed or was not opened) — 文件句柄无效;5008 — wrong file handle (handle index is out of handle table) — 文件句柄错误;5009 — file must be opened with FILE_WRITE flag — 文件必须设置为FILE_WRITE;5010 — file must be opened with FILE_READ flag — 文件必须设置为FILE_READ;5011 — file must be opened with FILE_BIN flag — 文件必须设置为FILE_BIN;5012 — file must be opened with FILE_TXT flag — 文件必须设置为FILE_TXT;5013 — file must be opened with FILE_TXT or FILE_CSV flag — 文件必须设置为FILE_TXT或FILE_CSV;5014 — file must be opened with FILE_CSV flag — 文件必须设置为FILE_CSV;5015 — file read error — 读文件错误;5016 — file write error — 写文件错误;5017 — string size must be specified for binary file — 二进制文件必须指定字符串大小;5018 — incompatible file (for string arrays-TXT, for others-BIN) — 文件不兼容;5019 — file is directory, not file — 目录名非文件名;5020 — file does not exist — 文件不存在;5021 — file cannot be rewritten — 文件不能被重复写入;5022 — wrong directory name — 错误的目录名;5023 — directory does not exist — 目录名不存在;5024 — specified file is not directory — 指定文件而不是目录;5025 — cannot delete directory — 不能删除目录;5026 — cannot clean directory — 不能清空目录;5027 — array resize error — 改变数组大小错误;5028 — string resize error — 改变字符串大小错误;5029 — structure contains strings or dynamic arrays — 结构体包含字符串或者动态数组;其它 — unknown error — 未知错误。
