int OrdersTotal( )
Returns market and pending orders count.
市場と待機のオーダー数を返します。
Sample:
サンプル:
1 2 3 4 5 6 7 8 9 10 11 12 | int handle=FileOpen("OrdersReport.csv",FILE_WRITE|FILE_CSV,"\t"); if(handle<0) return(0); // write header FileWrite(handle,"#","open price","open time","symbol","lots"); int total=OrdersTotal(); // write open orders for(int pos=0;pos<total;pos++) { if(OrderSelect(pos,SELECT_BY_POS)==false) continue; FileWrite(handle,OrderTicket(),OrderOpenPrice(),OrderOpenTime(),OrderSymbol(),OrderLots()); } FileClose(handle); |