/// <summary> /// 建構子 /// </summary> /// <param name="service">AbstractOrderService 下單服務抽象類別</param> /// <param name="args">下單參數</param> /// <param name="openNextBar">是否開倉於下一根 Bars</param> internal OrderMarket(AbstractOrderService service, SOrderParameters args, bool openNextBar) { this.ID = service.GetOrderID(); Contracts cContract = args.Lots; this.Info = new Order(args.Name, args.Action, OrderCategory.Market, (cContract.IsDefault) ? service.DefaultContracts : args.Lots, openNextBar, args.ExitTypeInfo); __cSender = service as IOrderSender; __cPositions = service.Positions; }
/// <summary> /// 建構子 /// </summary> /// <param name="service">AbstractOrderService 下單服務抽象類別</param> /// <param name="args">下單參數</param> internal OrderPriced(AbstractOrderService service, SOrderParameters args) { this.ID = service.GetOrderID(); Contracts cContract = args.Lots; this.Info = new Order(args.Name, args.Action, OrderCategory.Limit, (cContract.IsDefault) ? service.DefaultContracts : args.Lots, false, args.ExitTypeInfo); __cSender = service as IOrderSender; __cPositions = service.Positions; }
/// <summary> /// 建構子 /// </summary> /// <param name="service">AbstractOrderService 下單服務抽象類別</param> /// <param name="args">下單參數</param> /// <param name="openNextBar">是否開倉於下一根 Bars</param> internal OrderMarket(AbstractOrderService service, SOrderParameters args, bool openNextBar) { this.ID = System.Guid.NewGuid().GetHashCode(); Contracts cContract = args.Lots; this.Info = new Order(args.Name, args.Action, OrderCategory.Market, (cContract.IsDefault) ? service.DefaultContracts : args.Lots, openNextBar, args.ExitTypeInfo); __cSender = service as IOrderSender; __cPositions = service.Positions; }
/// <summary> /// 建構子 /// </summary> /// <param name="service">AbstractOrderService 下單服務抽象類別</param> /// <param name="args">下單參數</param> internal OrderPriced(AbstractOrderService service, SOrderParameters args) { this.ID = System.Guid.NewGuid().GetHashCode(); Contracts cContract = args.Lots; this.Info = new Order(args.Name, args.Action, OrderCategory.Limit, (cContract.IsDefault) ? service.DefaultContracts : args.Lots, false, args.ExitTypeInfo); __cEntrusts = (service as IOrderEntrust).Entrusts; __cSender = service as IOrderSender; __cPositions = service.Positions; }
public OrderController(IOrderManager orderManager, IOrderSender orderSender, IUserManager userManager) { _orderManager = orderManager; _orderSender = orderSender; _userManager = userManager; }
public OrderManager(IOrderSender sender) { orderSender = sender; }
public OrderProcessor(IOrderBatcher orderBatcher, IOrderSender orderSender, IOrderRecorder orderRecorder) { _orderBatcher = orderBatcher; _orderSender = orderSender; _orderRecorder = orderRecorder; }
public OrdersController(IOrderSender orderSender, ICustomerService customerService) { _orderSender = orderSender; _customerService = customerService; }