Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 public MarketOrder(Market market, Way buy, int quantity)
 {
     this.Market = market;
     this.buy = buy;
     this.quantity = quantity;
 }
Exemplo n.º 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;
        }
Exemplo n.º 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;
 }
 public void MarketFailed(Market market)
 {
     // TODO: refactor this so the method accepts IMarket instead
     this._lastMarketUpdates.First(m => m.Value.Market == market).Value.OrdersFailureCount++;
 }