Beispiel #1
0
		/// <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;
		}
Beispiel #2
0
		/// <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;
		}