- double LotsCount(int type)
-
- {
-
- double BuyLots=0;
-
- double SellLots=0;
-
- for (int t=0; t<OrdersTotal(); t++)
-
- {
-
- cg=OrderSelect(t, SELECT_BY_POS, MODE_TRADES);
-
- if (OrderType() == OP_BUY && OrderMagicNumber() == MagicNumber )BuyLots+=OrderLots();
-
- if (OrderType() == OP_SELL && OrderMagicNumber() == MagicNumber )SellLots+=OrderLots();
-
- }
-
- switch(type)
-
- {
-
- case OP_BUY: return (BuyLots);
-
- break;
-
- case OP_SELL: return (SellLots);
-
- break;
-
- }
-
- return(0);
-
- }
复制代码
|