该函数模块能够简洁的获取当前窗口最近平仓的一个订单的手数、盈利及其它相关订单信息。
- int totalorders=HistoryTotal();
- double histype,hisLots, hisProfit;
- for(poshis=0; poshis<totalorders; poshis++)
- {
- chenggong = OrderSelect(poshis,SELECT_BY_POS,MODE_HISTORY);
- if(OrderSymbol()==Symbol())
- histype=OrderType();
- hisProfit=OrderProfit();
- hisLots=OrderLots();
- }
|