获取历史订单总盈利
该函数获取平仓订单的总盈利。int totalorders=HistoryTotal();
for(int j=0; j<totalorders;j++)
{
if(OrderSelect(j,
SELECT_BY_POS,
MODE_HISTORY)
&&
(OrderMagicNumber()==Magic))
{
if((OrderType()==OP_BUY) || (OrderType()==OP_SELL))
{
StrategyProfit+=OrderProfit();
}
}
}
页:
[1]