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 cls71, Today, 04:45 AM
          0 responses
          1 view
          0 likes
          Last Post cls71
          by cls71
           
          Started by mjairg, 07-20-2023, 11:57 PM
          3 responses
          213 views
          1 like
          Last Post PaulMohn  
          Started by TheWhiteDragon, 01-21-2019, 12:44 PM
          4 responses
          544 views
          0 likes
          Last Post PaulMohn  
          Started by GLFX005, Today, 03:23 AM
          0 responses
          3 views
          0 likes
          Last Post GLFX005
          by GLFX005
           
          Started by XXtrader, Yesterday, 11:30 PM
          2 responses
          12 views
          0 likes
          Last Post XXtrader  
          Working...
          X