コード例 #1
0
 public ExecuteOrderSummaryItem(InstrumentClient instrument)
 {
     this._ChildSummaryItems = new ObservableCollection<ExecuteOrderSummaryItem>();
     this._Id = instrument.Id.ToString();
     this._ExecuteOrderSummaryType = ExecuteOrderSummaryType.Instrument;
     this._Instrument = instrument;
 }
コード例 #2
0
 public ExecuteOrderSummaryItem(InstrumentClient instrument, OrderRange orderRange)
 {
     this._ChildSummaryItems = new ObservableCollection<ExecuteOrderSummaryItem>();
     this._Code = orderRange.BeginRange + "~" + orderRange.EndRange;
     this._Id = instrument.Id + "_" + this._Code;
     this._ExecuteOrderSummaryType = ExecuteOrderSummaryType.Range;
     this._MinNumeratorUnit = instrument.NumeratorUnit;
     this._MaxDenominator = instrument.Denominator;
     this._Instrument = instrument;
     this._OrderRange = orderRange;
 }
コード例 #3
0
        internal void Update(Order order)
        {
            InstrumentClient instrument = order.Transaction.Instrument;
            this._ExecuteOrderSummaryType = ExecuteOrderSummaryType.Order;
            this._MinNumeratorUnit = instrument.NumeratorUnit;
            this._MaxDenominator = instrument.Denominator;
            this._Instrument = instrument;

            bool isBuy = order.BuySell == BuySell.Buy;
            decimal buyLot = isBuy ? order.Lot:0;
            decimal sellLot = !isBuy ? order.Lot:0;

            this._Id = order.Id.ToString();
            this._Code = order.Transaction.ExecuteTime.Value.ToString();
            this._BuyLot = buyLot;
            this._SellLot = sellLot;
            this._BuyAvgPrice = isBuy ? order.ExecutePrice : "0";
            this._SellAvgPrice = !isBuy ? order.ExecutePrice : "0";
            this.AccountCode = order.Transaction.Account.Code;
        }