统计获利金额的代码,求金币!
double GetTotalProfit(){
double TotalProfit=0;
for (int j= OrdersTotal() - 1; j >= 0; j--)
{
OrderSelect(j,SELECT_BY_POS, MODE_TRADES);
if (OrderType() == OP_BUY || OrderType() == OP_SELL && OrderMagicNumber() == MagicNumber)
TotalProfit += OrderProfit();
}
return (TotalProfit);
}
页:
[1]