MT4智能交易编程教程-运行MQL程序属性
为了获取当前运行的MQL5程序的信息,可以使用ENUM_MQL_INFO_INTEGER 和 ENUM_MQL_INFO_STRING常量。 函数 MQLInfoInteger ENUM_MQL_INFO_INTEGER Identifier | Description | Type | MQL_MEMORY_LIMIT | Maximum possible amount of dynamic memory for MQL5 program in MB | int | MQL_MEMORY_USED | The memory size used by MQL5 program in MB | int | MQL_PROGRAM_TYPE | MQL5程序类型 | ENUM_PROGRAM_TYPE | MQL_DLLS_ALLOWED | 允许为已生效的程序使用DLL | bool | MQL_TRADE_ALLOWED | 允许为已生效的程序交易 | bool | MQL_DEBUG | 标志表示调试方式 | bool | MQL_PROFILER | The flag, that indicates the program operating in the code profiling mode | bool | MQL_TESTER | 标志表示测试过程 | bool | MQL_OPTIMIZATION | 标志表示最佳化过程 | bool | MQL_VISUAL_MODE | 标志表示视觉测试器过程 | bool | MQL_FRAME_MODE | The flag, that indicates the Expert Advisor operating in gathering optimization result frames mode | bool | MQL_LICENSE_TYPE | Type of license of the EX5 module. The license refers to the EX5 module, from which a request is made using MQLInfoInteger(MQL_LICENSE_TYPE). | ENUM_LICENSE_TYPE |
函数 MQLInfoString ENUM_MQL_INFO_STRING 标识符 | 描述 | 类型 | MQL_PROGRAM_NAME | mql5已执行程序名称 | string | MQL_PROGRAM_PATH | 以执行系统路径 | string |
运行程序类型信息,使用ENUM_PROGRAM_TYPE 值 ENUM_PROGRAM_TYPE 标识符 | 描述 | PROGRAM_SCRIPT | 脚本 | PROGRAM_EXPERT | 专家 | PROGRAM_INDICATOR | 指标 |
ENUM_LICENSE_TYPE Identifier | Description | LICENSE_FREE | A free unlimited version | LICENSE_DEMO | A trial version of a paid product from the Market. It works only in the strategy tester | LICENSE_FULL | A purchased license version allows no more than three activations | LICENSE_TIME | License expiration time |
|