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

Level II List with IB

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

    Level II List with IB

    Hi guys

    I've got a custom list in the OnMarketDepth event holding incoming Level II ladder, using similar code to the Level II sample supplied by Ninja. One thing I can't figure out is that not all data feeds behave the same. Like IB for instance doesn't clear old levels. I checked the code and for whatever reason IB doesn't seem to generate an (e.Operation == Operation.Remove) event. While a feed like Zen does. Hence why my IB connection leaves my Level II list full of old data.

    Have you got any tips on how you go about clearing this. Is there a different event type for IB for the Operation.Remove event type?

    Best Regards
    Ross

    #2
    Hi Ross, I'm currently not aware of any special behavior needed here for IB - could it be a difference in datafeed speed / filtering you're seeing here?

    How would your DOM look like in comparison? It would access the same level 2 data.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      No nothing to do with speed or anything.Basically if I'm connected to Zen the OnMarketDepth gets triggered for an event of the type operation.Remove. In the code I catch this event and then remove old entries out the Level 2 list, the same as is in the code in the sample market depth. But for IB for whatever reason there are no Market Depth events triggered for operation.Remove so my code cannot fire. I thought maybe there is something different about the IB connector that it is not firing Operation.Remove events in OnMarketDepth. Could be me misinterpreting but I don't think so. I have debugged it and for IB just doesn't fire any Remove events.

      Comment


        #4
        Bertrand, don't worry about this, I have changed the code to remember the inside and outside levels and just clear boxes outside of the max dom levels on each update if the max levels have changed, rather than rely on a Remove event.

        Seems to work fine.

        Thanks for the help

        Comment


          #5
          Thanks for letting me know Ross - I wll put this on my list to look into further.
          BertrandNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by aussugardefender, Today, 01:07 AM
          0 responses
          3 views
          0 likes
          Last Post aussugardefender  
          Started by pvincent, 06-23-2022, 12:53 PM
          14 responses
          238 views
          0 likes
          Last Post Nyman
          by Nyman
           
          Started by TraderG23, 12-08-2023, 07:56 AM
          9 responses
          384 views
          1 like
          Last Post Gavini
          by Gavini
           
          Started by oviejo, Today, 12:28 AM
          0 responses
          4 views
          0 likes
          Last Post oviejo
          by oviejo
           
          Started by pechtri, 06-22-2023, 02:31 AM
          10 responses
          125 views
          0 likes
          Last Post Leeroy_Jenkins  
          Working...
          X