public void Update(BfaParentOrderParameter order) { OrderType = order.ConditionType; Side = order.Side; OrderSize = order.Size; if (OrderType == BfOrderType.Limit || OrderType == BfOrderType.StopLimit) { OrderPrice = order.Price; } if (OrderType == BfOrderType.Stop || OrderType == BfOrderType.StopLimit) { TriggerPrice = order.TriggerPrice; // TriggetPrice is present in ParentOrderParameter only } if (OrderType == BfOrderType.Trail) { TrailOffset = order.Offset; // Offset is present in ParentOrderParameter only } }
// Market/Limit/Stop/StopLimit/Trail of parent order from market public BfxChildOrder(BfProductCode productCode, BfaParentOrderParameter order) { ProductCode = productCode; Update(order); }