评论

收藏

统计当前持仓订单中多单的总数量

avatar 老周 | 918 人阅读 | 0 人评论 | 2017-03-20



统计当前持仓订单中多单的总数量

  1. int CalculateBuyOrders(string myType)//定义函数名
  2. {
  3. int cnt = 0;
  4. int total = OrdersTotal();//在开仓订单里面进行选择,包括挂单
  5. for(int i = 0;i<total;i++)
  6. {
  7. if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES) ==false) continue;//
  8. if (OrderType()==OP_BUY)//多单
  9. )
  10. cnt++;
  11. }
  12. return(cnt);
  13. }
复制代码


""
还没有人打赏,支持一下
您需要登录后才可以回帖 登录 | 注册 微信登录

EA之家评论守则