可以看到这个函数可以查询非常多的账户信息,下面我们把它们一一输入进去,看看输出的结果。为了不重复输出,我们用脚本来编写。
- void OnStart()
- {
- Print("账户余额="+(string) AccountInfoDouble(ACCOUNT_BALANCE));
- Print("账户亏损="+(string) AccountInfoDouble(ACCOUNT_CREDIT));
- Print("账户利润="+(string) AccountInfoDouble(ACCOUNT_PROFIT));
- Print("账户净值="+(string) AccountInfoDouble(ACCOUNT_EQUITY));
- Print("账户已用保证金="+(string) AccountInfoDouble
- (ACCOUNT_MARGIN));
- Print("账户可用保证金="+(string) AccountInfoDouble
- (ACCOUNT_MARGIN_FREE));
- Print("账户可用保证金比例="+(string) AccountInfoDouble
- (ACCOUNT_MARGIN_LEVEL) +"%");
- Print("账户追加保证金比例="+(string) AccountInfoDouble
- (ACCOUNT_MARGIN_SO_CALL) +"%");
- Print("爆仓保证金比例="+(string) AccountInfoDouble
- (ACCOUNT_MARGIN_SO_SO) +"%");
- Print("账户初始保证金="+(string) AccountInfoDouble
- (ACCOUNT_MARGIN_INITIAL));
- Print("账户维持保证金="+(string) AccountInfoDouble
- (ACCOUNT_MARGIN_MAINTENANCE) ); /*用于期货市场*/
- Print("账户活动资金="+(string) AccountInfoDouble
- (ACCOUNT_ASSETS)); /*用于期货市场*/
- Print("账户锁定保证金="+(string) AccountInfoDouble
- (ACCOUNT_COMMISSION_BLOCKED)); /*用于期货市场*/
- }
复制代码
|