Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Kinetick Bid/Ask live feed vs Replay

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Kinetick Bid/Ask live feed vs Replay

    Hi,

    I'm writing a strategy where I need to classify the trades as Buy/Sell according to whether it happened on the Ask/Bid (assume as if I build a Volume Ladder with Bid .vs. Ask).

    The problem is that the data I get in live feed is different from what I get when I download replay data and run it, the live feed is also different when I compare it to my friend's data running live IQFeed (my friend's live-feed matches my Replay results).

    For Example, on Friday Feb 4, after the open we traded at 1306, the result I got:
    live feed 531 X 1620 (Bid X Ask)
    Replay data downloaded from NT servers 244 X 1907 (Bid X Ask)

    Notice that the TOTAL volume is the same, so I am not missing ticks in the live feed, only the classification is different.

    Here is a snippest from my Strategy OnMarketData()

    Code:
     
    protected override void OnMarketData(MarketDataEventArgs e)
    {
     if (e.MarketDataType == MarketDataType.Bid)
     {
      m_bid = e.Price;
      m_bidSize = (int)e.Volume;
     }
     else if (e.MarketDataType == MarketDataType.Ask)
     {
      m_ask = e.Price;
      m_askSize = (int)e.Volume;
     }
     else if (e.MarketDataType == MarketDataType.Last && m_bidSize > 0 && m_askSize > 0)
     {
      if (e.Price >= m_ask)
       // Classify as Buy
      else if (e.Price <= m_bid)
       // Classify as Sell
     
      // ...
     }
    }
    Any idea why is that? is my code handling the market data is wrong for live-feed?

    Thank you very much,

    Yuval.

    #2
    Yuval, your code looks correct. Market Replay data is aggregated into .25 second sections, so that is probably where the discrepancy crept in.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Hi,

      I did a test today, opened NT with Kinetick on 3 min chart with the Buy/Sell Volume indicator.
      A friend did the same with MarketDelta and ZenFire.

      Attached 2 screenshots.

      The bar's open is the low and the bar's close is the high, so one can assume most volume was Buy volume.
      You can see that in both NT and MarketDelta the Total Volume is the same (16,297), but on NT the Sell Volume is 5,643 while on MarketDelta it is 2,347 - this is a big difference and according to the bar's open/close the MarketDelta numbers make more sense.

      looks like more trades are classified as "Sell" in NT as if the Bid/Ask stream is not synchronized.

      Any ideas?
      Attached Files

      Comment


        #4
        yuval, thanks for the screenshots - I will look into and attempt to reproduce the scenario here - did you see this happen for more bars or only for isolated ones like the one you've shown?

        For replay : please don't compare the results from Kinetick live data vs the replay data downloaded from our servers, as the sources would not match differences could be unfortunately expected.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hi,

          It was on all bars today not isolated, live feed not a replay.
          despite what you say on replay, from what I've seen, the replay data matched the backfilled data on market delta (backfill using iqfeed.

          Comment


            #6
            Ok, thanks for the info - will test and look into it here.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Bertrand View Post
              Ok, thanks for the info - will test and look into it here.
              Send you PM with my Kinetick user details, would appreciated if you could replrt back what your findings.

              Thx.

              Comment


                #8
                Got them, thanks - will let you know - I don't think it has to do with the credentials used - as you were comparing to ZenFire - were you using the newly introduced unaggregated data points in its connection setup or not?
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  The ZenFire was my friend with MarketDelta, I dont know...

                  Comment


                    #10
                    Thanks for reporting back, this might make a difference in the amount of tick delivered then - I'll keep it on my list to compare the two for discrepancies with the BuySellVolume.
                    BertrandNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by pibrew, Today, 06:37 AM
                    0 responses
                    4 views
                    0 likes
                    Last Post pibrew
                    by pibrew
                     
                    Started by rbeckmann05, Yesterday, 06:48 PM
                    1 response
                    14 views
                    0 likes
                    Last Post bltdavid  
                    Started by llanqui, Today, 03:53 AM
                    0 responses
                    6 views
                    0 likes
                    Last Post llanqui
                    by llanqui
                     
                    Started by burtoninlondon, Today, 12:38 AM
                    0 responses
                    11 views
                    0 likes
                    Last Post burtoninlondon  
                    Started by AaronKoRn, Yesterday, 09:49 PM
                    0 responses
                    16 views
                    0 likes
                    Last Post AaronKoRn  
                    Working...
                    X