国内新闻
求助一个EA程序问题。
2019-01-12 02:00  浏览:134
马上注册,结交更多好友,下载更多资源

您需要 登录 才可以下载或查看,没有帐号?注册 void total()
{
 int total_0=0,total_1 = 0,total = 0;
 int ordertype = 0;
 for(int i=0; i OrdersTotal(); i++)
 {
     OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
     ordertype = OrderType();
     if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=magic) continue;
       if(ordertype == OP_BUY)
       {
        total_0++;
       }
       else if(ordertype == OP_SELL)
       {
        total_1++;
       }   
 }
 total_buy = total_0;
 total_sell = total_1;
 total=total_0+total_1;
}
这样一串代码,能正常统计多单数量和空单数量吗?我实际运行似乎没达到我的统计效果。是不是有什么条件,请大侠们指点一下。
本主题由 admin 于 2018-1-10 16:52 移动
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!

发表评论
0评