如 打印当前账户余额 和 净值 等函数,注意,这里余额的概念是不计算当前未平仓的单子的盈亏金额的, 净值是包含未平仓的单子的盈亏金额的,所以如果有未平仓单,则你会发现净值一直在变化.
int OnInit()
{
EventSetTimer(60);
Print("Account number ", AccountNumber());
Print("当前账户净值是 ",AccountEquity());
Print("当前账户余额 ",AccountBalance());
Print("账户利润是 ",AccountProfit());
Print("账户可用预付款 ",AccountFreeMargin());
Print("当前账户已用预付款 ", AccountMargin());
return(INIT_SUCCEEDED);
}
执行该EA时,查看打印信息