09月22日, 2014 1156次
///x 最后几单 double getLastProfit(int x) { HistorySelect(,TimeCurrent()); double profit ; long ticket ; int count = ; double lastProfit = 0.0 ; for(int i=HistoryDealsTotal()-;i>=;i--) { ticket = HistoryDealGetTicket(i); if(HistoryDealGetInteger(ticket,DEAL_ENTRY)==) { count++ ; lastProfit += HistoryDealGetDouble(ticket,DEAL_PROFIT)+HistoryDealGetDouble(ticket,DEAL_SWAP)+HistoryDealGetDouble(ticket,DEAL_COMMISSION); if(count ==x) return lastProfit ; } } return ;
暂无留言,赶快评论吧