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

Decoding Level 2 commands

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

    Decoding Level 2 commands

    Hello

    I found some difference in Level 2 coding rules for different data feeds.

    This data is from CQG data feed printed in OnMarketDepth()

    Instrument='6E 03-17 Globex' Type=Bid MM='' Operation=Update Pos=7 Price=1,08035 Volume=52 Time=01.02.2017 8:00:14 bar=417726
    Instrument='6E 03-17 Globex' Type=Bid MM='' Operation=Update Pos=7 Price=1,0803 Volume=69 Time=01.02.2017 8:00:20 bar=417726

    To build correct DOM for 6E futures this should be interpreted as: "Set volume 69 for price 1,0803 at Bid side".
    So I need Dictionary<price, volume> to manage this.

    But for data from IQFeed for e.g. AAPL stock this should be interpreted as: "Overwrite position 7 at Bid side. Set price 1,0803 and volume 69"
    In this case I need Dictionary<position, {price, volume, optional MM}> to manage this.

    Am I right or not?
    NT7 Level II window displays correct Level 2 for both data feed.
    Last edited by ren37; 02-08-2017, 08:58 AM.

    #2
    Hello ren37,

    Thank you for your post.

    You are correct on how to interpret the updates of the Level 2.

    Please let me know if you have any questions.

    Comment


      #3
      Patrick, ty for reply.

      How I can know what algo to use?
      One algo is position based (for stocks) and other one is price based (for futures).

      Comment


        #4
        Hello ren37,

        Thank you for your response.

        It would depend on what values you wish to assign to your Dictionary.

        You can find two examples of working with Level 2 data at the following links:
        Please let me know if you have any questions.

        Comment


          #5
          Thank you.
          Error was in handling DOM via Dictionary which does not change position of resting DOM ladders on Dictionary.Remove(position).

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CortexZenUSA, Today, 12:53 AM
          0 responses
          1 view
          0 likes
          Last Post CortexZenUSA  
          Started by CortexZenUSA, Today, 12:46 AM
          0 responses
          1 view
          0 likes
          Last Post CortexZenUSA  
          Started by usazencortex, Today, 12:43 AM
          0 responses
          5 views
          0 likes
          Last Post usazencortex  
          Started by sidlercom80, 10-28-2023, 08:49 AM
          168 responses
          2,265 views
          0 likes
          Last Post sidlercom80  
          Started by Barry Milan, Yesterday, 10:35 PM
          3 responses
          11 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Working...
          X