- double GetProfitForDay(int ai_0)
- {
- double ld_ret_4 = 0;
- for (int l_pos_12 = 0; l_pos_12 < OrdersHistoryTotal(); l_pos_12++) {
- if (!(OrderSelect(l_pos_12, SELECT_BY_POS, MODE_HISTORY))) break;
- if (OrderSymbol() == Symbol() && (OrderMagicNumber() == BuyMagic || OrderMagicNumber() == SellMagic))
- if (OrderCloseTime() >= iTime(Symbol(), PERIOD_D1, ai_0) && OrderCloseTime() < iTime(Symbol(), PERIOD_D1, ai_0) + 86400) ld_ret_4 += OrderProfit();
- }
- return (ld_ret_4);
- }
|