MT4智能交易编程教程-账户属性
使用 AccountInfoInteger(), AccountInfoDouble() 和 AccountInfoString() 函数获得活期账户信息,该函数参数值可用接收类似于ENUM_ACCOUNT_INFO项目的值。 使用 AccountInfoInteger() 函数 ENUM_ACCOUNT_INFO_INTEGER 标识符 | 描述 | 类型 | ACCOUNT_LOGIN | 账户数量 | long | ACCOUNT_TRADE_MODE | 账户交易方式 | ENUM_ACCOUNT_TRADE_MODE | ACCOUNT_LEVERAGE | 账户杠杆 | long | ACCOUNT_LIMIT_ORDERS | 活跃待办订单最大允许量 | int | ACCOUNT_MARGIN_SO_MODE | 建立最少使用保证金方式 | ENUM_ACCOUNT_STOPOUT_MODE | ACCOUNT_TRADE_ALLOWED | 允许活期账户交易 | bool | ACCOUNT_TRADE_EXPERT | 允许EA交易 | bool |
函数 AccountInfoDouble() ENUM_ACCOUNT_INFO_DOUBLE 标识符 | 描述 | 类型 | ACCOUNT_BALANCE | 存入货币时账户结余 | double | ACCOUNT_CREDIT | 存入货币时账户亏空 | double | ACCOUNT_PROFIT | 存入货币时账户当前利润 | double | ACCOUNT_EQUITY | 存入货币时账户权益 | double | ACCOUNT_MARGIN | 存入货币时账户保证金使用 | double | ACCOUNT_FREEMARGIN | 存入货币时账户可用保证金 | double | ACCOUNT_MARGIN_LEVEL | 账户保证金水平仪百分比形式制定 | double | ACCOUNT_MARGIN_SO_CALL | 保证金调用水平,依据建立的ACCOUNT_MARGIN_SO_MODE,以百分比形式或存入货币时期表示 | double | ACCOUNT_MARGIN_SO_SO | 保证金停用水平,依据建立的ACCOUNT_MARGIN_SO_MODE,以百分比形式或存入货币时期表示 | double |
函数 AccountInfoString() ENUM_ACCOUNT_INFO_STRING 标识符 | 描述 | 类型 | ACCOUNT_NAME | 用户名 | string | ACCOUNT_SERVER | 交易服务器名称 | string | ACCOUNT_CURRENCY | 账户货币 | string | ACCOUNT_COMPANY | 提供账户的公司名称 | string |
There are several types of accounts that can be opened on a trade server. The type of account on which an MQL5 program is running can be found out using the ENUM_ACCOUNT_TRADE_MODE enumeration. ENUM_ACCOUNT_TRADE_MODE 标识符 | 描述 | ACCOUNT_TRADE_MODE_DEMO | 样本账户 | ACCOUNT_TRADE_MODE_CONTEST | 竞争账户 | ACCOUNT_TRADE_MODE_REAL | 真实账户 |
In case equity is not enough for maintaining open positions, the Stop Out situation, i.e. forced closing occurs. The minimum margin level at which Stop Out occurs can be set in percentage or in monetary terms. To find out the mode set for the account use the ENUM_ACCOUNT_STOPOUT_MODE enumeration. ENUM_ACCOUNT_STOPOUT_MODE 标识符 | 描述 | ACCOUNT_STOPOUT_MODE_PERCENT | 账户以半分比方式截止 | ACCOUNT_STOPOUT_MODE_MONEY | 账户以货币方式截止 |
|