예제 #1
0
파일: StgAmtOrder.cs 프로젝트: kiquenet/B4F
        internal StgAmtOrder(IStgSizeOrder childOrder, Money value)
            : base(childOrder.Account, value, childOrder.TradedInstrument)
        {
            // Used for TypeConversion

            // Some check
            if (childOrder.ParentOrder != null)
                throw new ApplicationException("This order has a parent order and can no longer be converted.");

            this.IsTypeConverted = true;
            childOrder.ResetPlacedValue();
            this.Route = childOrder.Route;
            base.Side = childOrder.Side;
            this.ChildOrders.Add(childOrder);
            this.exRate = (childOrder.ExRate != 0m) ? childOrder.ExRate : 1m ;
            Validate();
        }