Beispiel #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="priceGetter"></param>
 public void ChangeTime(double time, IPriceGetter priceGetter)
 {
     lock (lockObj)
     {
         List <OrderInfo> orders = accountOrder.TodayOrderInfos;
         for (int i = 0; i < orders.Count; i++)
         {
             OrderInfo order = orders[i];
             string    code  = order.Instrumentid;
             int       mount = accountOrder.CalcOrder(order, priceGetter.GetBuyPrice(code), priceGetter.GetBuyMount(code));
             if (mount > 0)
             {
                 accountPosition.SendPosition(order, mount);
             }
         }
     }
 }
Beispiel #2
0
 public double GetBuyPrice(string code)
 {
     return(priceGetter.GetBuyPrice(code));
 }