Пример #1
0
        //! [historicaltickslast]

        //! [tickbytickalllast]
        public void tickByTickAllLast(int reqId, int tickType, long time, double price, int size,
                                      TickAttribLast tickAttribLast, string exchange, string specialConditions)
        {
            Console.WriteLine(
                "Tick-By-Tick. Request Id: {0}, TickType: {1}, Time: {2}, Price: {3}, Size: {4}, Exchange: {5}, Special Conditions: {6}, PastLimit: {7}, Unreported: {8}",
                reqId, tickType == 1 ? "Last" : "AllLast",
                IBApi.Util.UnixSecondsToString(time, "yyyyMMdd-HH:mm:ss zzz"), price, size, exchange, specialConditions,
                tickAttribLast.PastLimit, tickAttribLast.Unreported);
        }
Пример #2
0
 public HistoricalTickLastMessage(int reqId, long time, TickAttribLast tickAttribLast, double price, long size, string exchange, string specialConditions)
 {
     ReqId             = reqId;
     Time              = time;
     TickAttribLast    = tickAttribLast;
     Price             = price;
     Size              = size;
     Exchange          = exchange;
     SpecialConditions = specialConditions;
 }
 public TickByTickAllLastMessage(int reqId, int tickType, long time, double price, long size, TickAttribLast tickAttribLast, string exchange, string specialConditions)
 {
     ReqId             = reqId;
     TickType          = tickType;
     Time              = time;
     Price             = price;
     Size              = size;
     TickAttribLast    = tickAttribLast;
     Exchange          = exchange;
     SpecialConditions = specialConditions;
 }
Пример #4
0
 /// <inheritdoc/>
 public void tickByTickAllLast(int reqId, int tickType, long time, double price, int size, TickAttribLast tickAttriblast, string exchange, string specialConditions)
 {
     throw new NotImplementedException();
 }
Пример #5
0
        void EWrapper.tickByTickAllLast(int reqId, int tickType, long time, double price, int size, TickAttribLast tickAttribLast, string exchange, string specialConditions)
        {
            var tmp = tickByTickAllLast;

            if (tmp != null)
            {
                FireEvent(t => tmp(new TickByTickAllLastMessage(reqId, tickType, time, price, size, tickAttribLast, exchange, specialConditions)), null);
            }
        }
Пример #6
0
 public void tickByTickAllLast(int reqId, int tickType, long time, double price, int size, TickAttribLast tickAttribLast, string exchange, string specialConditions)
 {
 }
Пример #7
0
 public void tickByTickAllLast(int reqId, int tickType, long time, double price, int size, TickAttribLast tickAttriblast, string exchange, string specialConditions)
 {
     TickByTickAllLast?.Invoke(new TickByTickAllLastMessage(reqId, tickType, time, price, size, tickAttriblast, exchange, specialConditions));
 }
Пример #8
0
        public void tickByTickAllLast(int reqId, int tickType, long time, double price, int size, TickAttribLast tickAttriblast, string exchange, string specialConditions)
        {
            var security = GetRequestSecurity(reqId);

            if (security == null)
            {
                return;
            }

            DateTime dt = time.FromIbkrTimeFormat();

            security.LastTrade = price.ToDecimal();

            OnLiveQuoteReceived(security, LiveQuoteType.Trade, dt, price.ToDecimal(), size);
        }