外汇MT4在EA运行时日志错误代码最完整汇总

MT4 的错误代码是存放在MetaEditor的libraries文件夹下 stdlib.mq4或stderror.mq4文件中


但是内容都是英文,我将这部分的翻译转过来,以供参考


    case 1:   error_string="no error";   没有错误返回。;

     case 2:   error_string="common error";   没有错误返回但结果不明;

     case 3:   error_string="invalid trade parameters"; 一般错误;

     case 4:   error_string="trade server is busy";无效交易参量;

     case 5:   error_string="old version of the client terminal";交易服务器繁忙;

     case 6:   error_string="no connection with trade server";客户终端旧版本;

     case 7:   error_string="not enough rights";没有连接服务器;

     case 8:   error_string="too frequent requests";没有权限;

     case 9:  error_string="malfunctional trade operation (never returned error)";请求过于频繁;

     case 64: error_string="account disabled"; 交易运行故障;

     case 65: error_string="invalid account";账户禁止;

     case 128: error_string="trade timeout";无效超时;

     case 129: error_string="invalid price"; 无效价格;

     case 130: error_string="invalid stops";无效停止;

     case 131: error_string="invalid trade volume";无效交易量;

     case 132: error_string="market is closed";市场关闭;

     case 133: error_string="trade is disabled";交易被禁止;

     case 134: error_string="not enough money";资金不足;

     case 135: error_string="price changed";价格改变;

     case 136: error_string="off quotes"; 开价;

     case 137: error_string="broker is busy (never returned error)";经纪繁忙;

     case 138: error_string="requote";重新开价;

     case 139: error_string="order is locked";定单被锁定;

     case 140: error_string="long positions only allowed";只允许看涨仓位;

     case 141: error_string="too many requests";过多请求;

     case 145: error_string="modification denied because order too close to market";因为过于接近市场,修改否定;

     case 146: error_string="trade context is busy";交易文本已满;

     case 147: error_string="expirations are denied by broker";时间周期被经纪否定;

     case 148: error_string="amount of open and pending orders has reached the limit";开单和挂单总数已被经纪限定;

     case 149: error_string="hedging is prohibited";当对冲备拒绝时,打开相对于现有的一个单置;

     case 150: error_string="prohibited by FIFO rules";把为反FIFO规定的单子平掉;

      以下是mql4的错误代码


     case 4000: error_string="no error (never generated code)"; 没有错误;

     case 4001: error_string="wrong function pointer";   错误函数指示;

     case 4002: error_string="array index is out of range";数组索引超出范围;

     case 4003: error_string="no memory for function call stack"; 对于调用堆栈储存器函数没有足够内存;

     case 4004: error_string="recursive stack overflow"; 循环堆栈储存器溢出;

     case 4005: error_string="not enough stack for parameter";对于堆栈储存器参量没有内存;

     case 4006: error_string="no memory for parameter string";对于字行参量没有足够内存;

     case 4007: error_string="no memory for temp string";对于字行没有足够内存;

     case 4008: error_string="not initialized string";没有初始字行;

     case 4009: error_string="not initialized string in array";在数组中没有初始字串符;

     case 4010: error_string="no memory for array\' string";对于数组没有内存;

     case 4011: error_string="too long string"; 字行过长;

     case 4012: error_string="remainder from zero divide"; 余数划分为零;

     case 4013: error_string="zero divide"; 零划分;

     case 4014: error_string="unknown command";不明命令;

     case 4015: error_string="wrong jump (never generated error)";错误转换(没有常规错误);

     case 4016: error_string="not initialized array";没有初始数组;

     case 4017: error_string="dll calls are not allowed";禁止调用DLL; //出现这个异常在导入时候运行动态调用dll即可

     case 4018: error_string="cannot load library"; 数据库不能下载;

     case 4019: error_string="cannot call function"; 不能调用函数;

     case 4020: error_string="expert function calls are not allowed";禁止调用智能交易函数;

     case 4021: error_string="not enough memory for temp string returned from function"; 对于来自函数的字行没有足够内存;

     case 4022: error_string="system is busy (never generated error)";系统繁忙 (没有常规错误);

     case 4050: error_string="invalid function parameters count"; 无效计数参量函数;

     case 4051: error_string="invalid function parameter value"; 无效参量值函数;

     case 4052: error_string="string function internal error";字行函数内部错误;

     case 4053: error_string="some array error"; 一些数组错误;

     case 4054: error_string="incorrect series array using";应用不正确数组;

     case 4055: error_string="custom indicator error"; 自定义指标错误;

     case 4056: error_string="arrays are incompatible"; 不协调数组;

     case 4057: error_string="global variables processing error";整体变量过程错误;

     case 4058: error_string="global variable not found"; 整体变量未找到;

     case 4059: error_string="function is not allowed in testing mode";测试模式函数禁止;

     case 4060: error_string="function is not confirmed";没有确认函数;

     case 4061: error_string="send mail error"; 发送邮件错误;

     case 4062: error_string="string parameter expected"; 字行预计参量;

     case 4063: error_string="integer parameter expected"; 整数预计参量;

     case 4064: error_string="double parameter expected"; 双预计参量;

     case 4065: error_string="array as parameter expected"; 数组作为预计参量;

     case 4066: error_string="requested history data in update state"; 刷新状态请求历史数据;


     case 4067: error_string="ERR_TRADE_ERROR";交易函数错误;


     case 4099: error_string="end of file ERR_END_OF_FILE"; 文件结束;

     case 4100: error_string="some file error"; 一些文件错误;

     case 4101: error_string="wrong file name";错误文件名称

     case 4102: error_string="too many opened files";打开文件过多;

     case 4103: error_string="cannot open file"不能打开文件;

     case 4104: error_string="incompatible access to a file"不协调文件;

     case 4105: error_string="no order selected"没有选择定单;

     case 4106: error_string="unknown symbol";不明货币对;

     case 4107: error_string="invalid price parameter for trade function"; 无效价格;

     case 4108: error_string="invalid ticket"; 无效定单编码;

     case 4109: error_string="trade is not allowed in the expert properties";  不允许交易;

     case 4110: error_string="longs are not allowed in the expert properties"; 不允许长期;

     case 4111: error_string="shorts are not allowed in the expert properties"; 不允许短期;

     case 4200: error_string="object is already exist";   定单已经存在;

     case 4201: error_string="unknown object property"; 不明定单属性;

     case 4202: error_string="object is not exist"; 定单不存在;

     case 4203: error_string="unknown object type";   不明定单类型;

     case 4204: error_string="no object name";没有定单名称;

     case 4205: error_string="object coordinates error";   定单坐标错误;

     case 4206: error_string="no specified subwindow"; 没有指定子窗口;


以下是源代码(少了4067的错误代码):


case 0:

     case 1:   error_string="no error";                                                 break;

     case 2:   error_string="common error";                                             break;

     case 3:   error_string="invalid trade parameters";                                 break;

     case 4:   error_string="trade server is busy";                                     break;

     case 5:   error_string="old version of the client terminal";                       break;

     case 6:   error_string="no connection with trade server";                          break;

     case 7:   error_string="not enough rights";                                        break;

     case 8:   error_string="too frequent requests";                                    break;

     case 9:  error_string="malfunctional trade operation (never returned error)";     break;

     case 64: error_string="account disabled";                                         break;

     case 65: error_string="invalid account";                                          break;

     case 128: error_string="trade timeout";                                            break;

     case 129: error_string="invalid price";                                            break;

     case 130: error_string="invalid stops";                                            break;

     case 131: error_string="invalid trade volume";                                     break;

     case 132: error_string="market is closed";                                         break;

     case 133: error_string="trade is disabled";                                        break;

     case 134: error_string="not enough money";                                         break;

     case 135: error_string="price changed";                                            break;

     case 136: error_string="off quotes";                                               break;

     case 137: error_string="broker is busy (never returned error)";                    break;

     case 138: error_string="requote";                                                  break;

     case 139: error_string="order is locked";                                          break;

     case 140: error_string="long positions only allowed";                              break;

     case 141: error_string="too many requests";                                        break;

     case 145: error_string="modification denied because order too close to market";    break;

     case 146: error_string="trade context is busy";                                    break;

     case 147: error_string="expirations are denied by broker";                         break;

     case 148: error_string="amount of open and pending orders has reached the limit";  break;

     case 149: error_string="hedging is prohibited";                                    break;

     case 150: error_string="prohibited by FIFO rules";                                 break;

     //---- mql4 errors

     case 4000: error_string="no error (never generated code)";                         break;

     case 4001: error_string="wrong function pointer";                                  break;

     case 4002: error_string="array index is out of range";                             break;

     case 4003: error_string="no memory for function call stack";                       break;

     case 4004: error_string="recursive stack overflow";                                break;

     case 4005: error_string="not enough stack for parameter";                          break;

     case 4006: error_string="no memory for parameter string";                          break;

     case 4007: error_string="no memory for temp string";                               break;

     case 4008: error_string="not initialized string";                                  break;

     case 4009: error_string="not initialized string in array";                         break;

     case 4010: error_string="no memory for array\' string";                            break;

     case 4011: error_string="too long string";                                         break;

     case 4012: error_string="remainder from zero divide";                              break;

     case 4013: error_string="zero divide";                                             break;

     case 4014: error_string="unknown command";                                         break;

     case 4015: error_string="wrong jump (never generated error)";                      break;

     case 4016: error_string="not initialized array";                                   break;

     case 4017: error_string="dll calls are not allowed";                               break;

     case 4018: error_string="cannot load library";                                     break;

     case 4019: error_string="cannot call function";                                    break;

     case 4020: error_string="expert function calls are not allowed";                   break;

     case 4021: error_string="not enough memory for temp string returned from function"; break;

     case 4022: error_string="system is busy (never generated error)";                  break;

     case 4050: error_string="invalid function parameters count";                       break;

     case 4051: error_string="invalid function parameter value";                        break;

     case 4052: error_string="string function internal error";                          break;

     case 4053: error_string="some array error";                                        break;

     case 4054: error_string="incorrect series array using";                            break;

     case 4055: error_string="custom indicator error";                                  break;

     case 4056: error_string="arrays are incompatible";                                 break;

     case 4057: error_string="global variables processing error";                       break;

     case 4058: error_string="global variable not found";                               break;

     case 4059: error_string="function is not allowed in testing mode";                 break;

     case 4060: error_string="function is not confirmed";                               break;

     case 4061: error_string="send mail error";                                         break;

     case 4062: error_string="string parameter expected";                               break;

     case 4063: error_string="integer parameter expected";                              break;

     case 4064: error_string="double parameter expected";                               break;

     case 4065: error_string="array as parameter expected";                             break;

     case 4066: error_string="requested history data in update state";                  break;

     case 4099: error_string="end of file";                                             break;

     case 4100: error_string="some file error";                                         break;

     case 4101: error_string="wrong file name";                                         break;

     case 4102: error_string="too many opened files";                                   break;

     case 4103: error_string="cannot open file";                                        break;

     case 4104: error_string="incompatible access to a file";                           break;

     case 4105: error_string="no order selected";                                       break;

     case 4106: error_string="unknown symbol";                                          break;

     case 4107: error_string="invalid price parameter for trade function";              break;

     case 4108: error_string="invalid ticket";                                          break;

     case 4109: error_string="trade is not allowed in the expert properties";           break;

     case 4110: error_string="longs are not allowed in the expert properties";          break;

     case 4111: error_string="shorts are not allowed in the expert properties";         break;

     case 4200: error_string="object is already exist";                                 break;

     case 4201: error_string="unknown object property";                                 break;

     case 4202: error_string="object is not exist";                                     break;

     case 4203: error_string="unknown object type";                                     break;

     case 4204: error_string="no object name";                                          break;

     case 4205: error_string="object coordinates error";                                break;

     case 4206: error_string="no specified subwindow";                                  break;

     default:   error_string="unknown error";





















★ 【推荐】智橙·天钻EA至臻版:自2021~2023年,$1000本金运行,0.01手起始仓位非复利,观摩盈利目前总资金$17500+,风险控制最大回撤30%以内... ...  点击查看

  • · 本网所载的全部内容仅作参考之用,所载资料来源和观点客观可靠,但不担保其准确性或完整性,且内容不构成对任何人的投资建议。
  • · 本网所提供的行情数据分析及观点不应取代个人的独立判断,不对因使用本网而造成的损失承担任何责任,据此入市,风险自担!