Example #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="childOrder">Child order to create for this stichting order</param>
 public StgAmtOrder(IStgAmtOrder childOrder)
     : base(childOrder.Account, (IOrderAmountBased)childOrder)
 {
     // Used for Netting
     this.Route = childOrder.Route;
     this.exRate = childOrder.ExRate;
     this.IsNetted = true;
 }
Example #2
0
        internal StgSizeOrder(IStgAmtOrder childOrder, InstrumentSize value, Price price, IOrderRouteMapper routeMapper)
            : base(childOrder.Account, value, false)
        {
            // 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;
            setInitialValues(routeMapper);
            this.price = price;
            this.ChildOrders.Add(childOrder);
            childOrder.Approve();
            //this.CommissionDetails = childOrder.CommissionDetails;
            this.exRate = childOrder.ExRate;
            Validate();
        }
Example #3
0
        internal StgAmtOrder(IStgAmtOrder childOrder, decimal exRate, Money convertedAmount)
            : base(childOrder.Account, convertedAmount, childOrder.TradedInstrument)
        {
            // Used for Fx Conversion

            // Some checks
            if (childOrder.ParentOrder != null)
                throw new ApplicationException("This order has a parent order and can no longer be converted.");
            if (exRate == 0M)
                throw new ApplicationException("The exchange rate can not be 0.");

            this.IsCurrencyConverted = true;
            this.Route = childOrder.Route;
            base.Side = childOrder.Side;
            this.ChildOrders.Add(childOrder);
            childOrder.Approve();
            childOrder.SetExRate(exRate);
            Validate();
        }