コード例 #1
0
 public LimitOrder(Market market, Way way, decimal price, int quantity, bool allowPartialExecution)
 {
     this.Market = market;
     this.AllowPartialExecution = allowPartialExecution;
     this.Way = way;
     this.Price = price;
     this.Quantity = quantity;
 }
コード例 #2
0
 public OrderDescription(Market targetMarket, Way orderWay, int quantity, decimal orderPrice, bool allowPartial)
 {
     this.TargetMarket = targetMarket;
     this.OrderWay = orderWay;
     this.Quantity = quantity;
     this.OrderPrice = orderPrice;
     this.AllowPartial = allowPartial;
 }
コード例 #3
0
 public MarketOrder(Market market, Way buy, int quantity)
 {
     this.Market = market;
     this.buy = buy;
     this.quantity = quantity;
 }
コード例 #4
0
        private static SmartOrderRoutingEngine BuildSor()
        {
            var marketA = new Market
                              {
                                  SellQuantity = 150,
                                  SellPrice = 100M,     
                              };

            var marketB = new Market
                              {
                                  SellQuantity = 55,
                                  SellPrice = 101M,
                              };

            var markets = new[] { marketA, marketB };
            var sor = new SmartOrderRoutingEngine(new MarketProvider(markets), null, new MarketDataProvider(markets));
            return sor;
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MarketInfo"/> class.
 /// </summary>
 /// <param name="market">The market.</param>
 public MarketInfo(Market market)
 {
     this.Market = market;
 }
コード例 #6
0
 public void MarketFailed(Market market)
 {
     // TODO: refactor this so the method accepts IMarket instead
     this._lastMarketUpdates.First(m => m.Value.Market == market).Value.OrdersFailureCount++;
 }