Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can't get LAST in MarketDepth

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

    Can't get LAST in MarketDepth

    Hi,

    I want receive the last (trades) in the market depth but there are only bid/ask

    If I use MarketData I receive Bid/Ask/Last but not the marketdepth

    When I see timestamp between OnMarketData and OnMarketDataDepth it's not in order !!!!

    How do to get the good order, there are an orderID , millisecond in timestamp, ... ?

    thanks

    #2
    Welcome to our forums - timestamps would be down to 1 second. OnMarketData() is used for Level 1 data events (Last / Bid / Ask), while OnMarketDepth() would be used to access the 5 best bid / ask (book) levels.

    Comment


      #3
      Thanks for your replay !

      It's possible to synchronize Depth market with the trades (last) ?

      Comment


        #4
        I'm not exactly sure I follow you - in real time the events will be called whenever there is either a change in Level 1 or Level 2 data. In Market Replay, the granularity is limited to 1 second, enhancing this is on our feedback list already.

        Comment


          #5
          OK NinjaTrader_Bertrand,

          I want construct a feed L2 with depth market and trades but I can't synchronize MarketData and MarketDataDepth, because there are more update of the best bid/ask in the L1 than L2.

          I count 20 update in one second on 6750.50/6751 (L1) VERSUS 3 update 6750.50/6751 (L2)

          The is that the data receive from L1 to 10:10:12 are:

          +++++++++++++++++++++++++++++ Last | 101012 | 6750.50 | 2
          DailyVolume | 101012 | 0.00 | 17,098
          +++++++++++++++++++++++++++++ Last | 101012 | 6751.00 | 3
          DailyVolume | 101012 | 0.00 | 17,101
          Ask | 101012 | 6751.00 | 15
          Bid | 101012 | 6750.00 | 4
          Ask | 101012 | 6751.00 | 14
          Bid | 101012 | 6750.00 | 7
          Ask | 101012 | 6751.00 | 12
          Bid | 101012 | 6750.00 | 9
          Ask | 101012 | 6751.00 | 11
          Bid | 101012 | 6750.50 | 1
          Ask | 101012 | 6751.00 | 7
          Ask | 101012 | 6751.00 | 6
          Bid | 101012 | 6750.50 | 2
          Ask | 101012 | 6751.00 | 5
          Bid | 101012 | 6750.50 | 3
          Ask | 101012 | 6751.00 | 4
          Ask | 101012 | 6751.00 | 3
          +++++++++++++++++++++++++++++ Last | 101012 | 6750.50 | 1
          DailyVolume | 101012 | 0.00 | 17,102
          Bid | 101012 | 6750.50 | 2
          Ask | 101012 | 6751.00 | 4
          Ask | 101012 | 6751.00 | 3
          Ask | 101012 | 6751.00 | 4
          Ask | 101012 | 6751.00 | 5

          and the data from L2 are (B: bid, A: ask) :

          B,U,6750.5,101012,3
          A,U,6751,101012,4
          A,U,6753,101012,30
          A,U,6751,101012,3
          A,U,6753,101012,31
          B,U,6749,101012,26
          A,U,6753,101012,32
          A,U,6753,101012,33
          A,U,6753,101012,34
          A,R,0,101012,0
          A,R,0,101012,0
          A,I,6751.5,101012,8
          A,I,6761,101012,26
          A,U,6752.5,101012,24
          A,U,6753.5,101012,19
          A,U,6751.5,101012,7
          A,U,6756.5,101012,15
          A,U,6752,101012,19
          B,U,6750,101012,17
          A,U,6752.5,101012,21
          B,U,6749.5,101012,13
          A,U,6753,101012,38
          B,U,6748.5,101012,23
          A,U,6754,101012,23
          B,U,6747.5,101012,37
          A,U,6754.5,101012,32
          B,U,6746.5,101012,17
          A,U,6755.5,101012,24
          B,U,6745.5,101012,14
          A,U,6756,101012,23
          B,U,6745,101012,45
          A,U,6757,101012,24
          B,U,6744.5,101012,63
          A,U,6758,101012,105
          B,U,6743.5,101012,16
          A,U,6759,101012,19
          B,U,6742.5,101012,75
          A,U,6759.5,101012,31
          B,U,6741.5,101012,12
          A,U,6760.5,101012,16
          A,U,6752.5,101012,20
          A,U,6753.5,101012,18
          A,U,6754,101012,24
          A,U,6756.5,101012,14
          A,U,6757,101012,25
          A,U,6760.5,101012,17
          A,U,6752.5,101012,19
          A,U,6753.5,101012,19
          B,U,6746,101012,31
          B,U,6745.5,101012,12

          Comment


            #6
            This can be the case as both would listen to different events completely - to see how to construct a Level 2 book, please see this sample -

            Comment


              #7
              Ok for the sample, but why the L1 feed and L2 feed are different for the best bid/ask ?

              normally the L2 include L1, not ?

              Comment


                #8
                Yes, the Level 2 0 position would be the current bid / ask as also reported by the OnMarketData() method. Are you comparing the correct positions in the book to Level 1 data? Due to update timing (different events) you might still see slight differences.

                Comment


                  #9
                  Thank you,

                  I feel there is a gap between the timestamp on the two streams.

                  I continue to seek

                  Comment


                    #10
                    Why your L1 feed and L2 feed are not in the same order ?
                    (Market data replay FDAX 2010-11-08)

                    sample :
                    (A/B bid/ask == price == HHmmss == volume)

                    --- L1 ---
                    A == 6756 == 80009 == 2
                    B == 6754.5 == 80009 == 2
                    B == 6754.5 == 80009 == 3
                    B == 6755.5 == 80009 == 1
                    A == 6756 == 80010 == 7
                    B == 6755.5 == 80010 == 3
                    B == 6755.5 == 80011 == 2
                    B == 6755.5 == 80011 == 1
                    B == 6755 == 80011 == 2
                    A == 6755.5 == 80011 == 1
                    B == 6755 == 80012 == 1
                    A == 6756 == 80012 == 10
                    B == 6754.5 == 80012 == 3
                    B == 6755 == 80012 == 4
                    A == 6756 == 80013 == 11
                    A == 6756 == 80013 == 10
                    A == 6755.5 == 80013 == 2
                    B == 6755 == 80013 == 3
                    B == 6754.5 == 80013 == 3
                    B == 6755 == 80013 == 1
                    A == 6756 == 80014 == 10
                    A == 6756 == 80014 == 9
                    A == 6755.5 == 80015 == 22
                    A == 6755 == 80015 == 21
                    B == 6754.5 == 80015 == 4
                    B == 6754.5 == 80015 == 2

                    --- L2 position 0 (normally the same)

                    A == 6756 == 80008 == 2
                    B == 6754.5 == 80008 == 2
                    B == 6754.5 == 80008 == 3
                    B == 6755.5 == 80008 == 1
                    A == 6756 == 80009 == 7
                    B == 6755.5 == 80009 == 3
                    B == 6755.5 == 80010 == 2
                    B == 6755.5 == 80010 == 1
                    A == 6755.5 == 80010 == 1
                    B == 6755 == 80011 == 1
                    B == 6755 == 80011 == 4
                    A == 6756 == 80012 == 11
                    A == 6756 == 80012 == 10
                    A == 6755.5 == 80012 == 2
                    B == 6755 == 80012 == 3
                    B == 6755 == 80012 == 1
                    A == 6756 == 80013 == 9
                    A == 6755.5 == 80014 == 22
                    A == 6755 == 80014 == 21
                    B == 6754.5 == 80014 == 2
                    A == 6754.5 == 80014 == 19
                    A == 6754 == 80014 == 9
                    B == 6753.5 == 80014 == 2
                    B == 6753.5 == 80015 == 3
                    B == 6753.5 == 80015 == 6
                    A == 6754 == 80015 == 1
                    B == 6753.5 == 80015 == 5
                    B == 6753.5 == 80015 == 4
                    B == 6753.5 == 80015 == 7
                    B == 6753.5 == 80015 == 9
                    A == 6754 == 80016 == 2
                    A == 6754 == 80016 == 1
                    B == 6753.5 == 80016 == 8
                    B == 6753.5 == 80016 == 9
                    B == 6753.5 == 80016 == 10
                    B == 6753.5 == 80016 == 12
                    B == 6753.5 == 80016 == 13
                    Last edited by Vash666; 11-12-2010, 02:39 AM.

                    Comment


                      #11
                      Vash666, they would be aligned within a 1 second tolerance window - http://www.ninjatrader.com/support/f...ad.php?t=34923

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      647 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      369 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      108 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      572 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      573 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X