int OrdersTotal( )
返回市场和挂单的总数
示例:
- int handle=FileOpen("OrdersReport.csv",FILE_WRITE|FILE_CSV,"\t");
- if(handle<0) return(0);
- // 写标题
- FileWrite(handle,"#","开价格","买入时间","货币对","手数");
- int total=OrdersTotal();
- // 编写定单命令
- for(int pos=0;pos<total;pos++)
- {
- if(OrderSelect(pos,SELECT_BY_POS)==false) continue;
- FileWrite(handle,OrderTicket(),OrderOpenPrice(),OrderOpenTime(),OrderSymbol(),OrderLots());
- }
- FileClose(handle);
复制代码
|