- datetime 最后平仓单时间(int op, int magic)
- {
- datetime a = 0;
- for(int i = 0; i < OrdersHistoryTotal(); i++)
- {
- if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY) == true)
- {
- if(OrderMagicNumber() == magic)
- {
- if(OrderSymbol() == Symbol())
- {
- if(OrderType() == op)
- {
- if(OrderType() < 2)
- {
- a = OrderCloseTime();
- }
- }
- }
- }
- }
- }
- return(a);
- }
复制代码
|