|
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; } 这样一串代码,能正常统计多单数量和空单数量吗?我实际运行似乎没达到我的统计效果。是不是有什么条件,请大侠们指点一下。 |
求助一个EA程序问题。
回复:0 浏览:180
- 楼主admin 圈主
- 2019-05-05 05:07