Exemplo n.º 1
0
        internal static MDOperation Convert(OrderBookAction action)
        {
            switch (action)
            {
            case OrderBookAction.Insert:
                return(MDOperation.Insert);

            case OrderBookAction.Update:
                return(MDOperation.Update);

            case OrderBookAction.Delete:
                return(MDOperation.Delete);

            case OrderBookAction.Reset:
                return(MDOperation.Reset);

            case OrderBookAction.Undefined:
                return(MDOperation.Undefined);

            default:
                throw new NotSupportedException(string.Format("OrderBookAction is not supported - {0}", action));
            }
        }
Exemplo n.º 2
0
		internal static MDOperation Convert(OrderBookAction action)
		{
			switch (action)
			{
			case OrderBookAction.Insert:
				return MDOperation.Insert;
			case OrderBookAction.Update:
				return MDOperation.Update;
			case OrderBookAction.Delete:
				return MDOperation.Delete;
			case OrderBookAction.Reset:
				return MDOperation.Reset;
			case OrderBookAction.Undefined:
				return MDOperation.Undefined;
			default:
				throw new NotSupportedException(string.Format("OrderBookAction is not supported - {0}", action));
			}
		}
Exemplo n.º 3
0
		public static void Add(Instrument instrument, DateTime datetime, BidAsk side, OrderBookAction action, int position, double price, int size)
		{
			DataManager.Add(instrument, new OrderBookUpdate(new MarketDepth(datetime, string.Empty, position, EnumConverter.Convert(action), EnumConverter.Convert(side), price, size)));
		}
 /// <inheritdoc />
 public OrderBookLevelBulk(OrderBookAction action, OrderBookLevel[] levels, CryptoOrderBookType orderBookType)
 {
     Action        = action;
     OrderBookType = orderBookType;
     Levels        = levels ?? new OrderBookLevel[0];
 }
Exemplo n.º 5
0
 public static void Add(Instrument instrument, DateTime datetime, BidAsk side, OrderBookAction action, int position, double price, int size)
 {
     DataManager.Add(instrument, new OrderBookUpdate(new MarketDepth(datetime, string.Empty, position, EnumConverter.Convert(action), EnumConverter.Convert(side), price, size)));
 }
Exemplo n.º 6
0
 protected void EmitNewOrderBookUpdate(Instrument instrument, DateTime time, BidAsk side, OrderBookAction action, double price, int size, int position)
 {
     this.provider.EmitMarketDepth(instrument, time, side, action, price, size, position);
 }
Exemplo n.º 7
0
        public void EmitMarketDepth(global::OpenQuant.API.Instrument instrument, DateTime time, BidAsk side, OrderBookAction action, double price, int size, int position)
        {
            MarketDepth marketDepth = new MarketDepth(time, string.Empty, position, global::OpenQuant.API.EnumConverter.Convert(action), global::OpenQuant.API.EnumConverter.Convert(side), price, size);

            if (this.NewMarketDepth != null)
            {
                this.NewMarketDepth(this, new MarketDepthEventArgs(marketDepth, instrument.instrument, this));
            }
        }
Exemplo n.º 8
0
		protected void EmitNewOrderBookUpdate(Instrument instrument, DateTime time, BidAsk side, OrderBookAction action, double price, int size, int position)
		{
			this.provider.EmitMarketDepth(instrument, time, side, action, price, size, position);
		}
Exemplo n.º 9
0
		public void EmitMarketDepth(global::OpenQuant.API.Instrument instrument, DateTime time, BidAsk side, OrderBookAction action, double price, int size, int position)
		{
			MarketDepth marketDepth = new MarketDepth(time, string.Empty, position, global::OpenQuant.API.EnumConverter.Convert(action), global::OpenQuant.API.EnumConverter.Convert(side), price, size);
			if (this.NewMarketDepth != null)
			{
				this.NewMarketDepth(this, new MarketDepthEventArgs(marketDepth, instrument.instrument, this));
			}
		}
Exemplo n.º 10
0
        public void EmitMarketDepth(Instrument instrument, DateTime time, BidAsk side, OrderBookAction action, double price, int size, int position)
        {
            MarketDepth marketDepth = new MarketDepth(time, string.Empty, position, EnumConverter.Convert(action), EnumConverter.Convert(side), price, size);

            if (this.NewMarketDepth == null)
            {
                return;
            }
            this.NewMarketDepth((object)this, new MarketDepthEventArgs(marketDepth, (IFIXInstrument)instrument.instrument, (IMarketDataProvider)this));
        }
Exemplo n.º 11
0
 public void EmitMarketDepth(Instrument instrument, DateTime time, BidAsk side, OrderBookAction action, double price, int size, int position)
 {
   MarketDepth marketDepth = new MarketDepth(time, string.Empty, position, EnumConverter.Convert(action), EnumConverter.Convert(side), price, size);
   if (this.NewMarketDepth == null)
     return;
   this.NewMarketDepth((object) this, new MarketDepthEventArgs(marketDepth, (IFIXInstrument) instrument.instrument, (IMarketDataProvider) this));
 }