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

5 second Interactive broker "ticks"

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

    5 second Interactive broker "ticks"

    As far as I understand, when IB is used for data, NT takes the snapshots that IB sends and treats these as "ticks", building a bar from them.

    But IB sends two types of "snapshots", one every ~200ms, and one every 5 seconds. NT chooses to build it's bars using the 200ms snapshots.

    Is there anyway for NT to instead use the 5 second snapshots? These are much more reliable and accurate (plus, they have native time stamps!). If not now, maybe in a future release of NT? I feel like the change could be made with a few lines of code, since you'd simply be changing which type of IB data you'd be subscribing to (reqRealTimeBars() instead of reqMktData()):

    Interactive Brokers complete API documentation. Encompassing Trader Workstation (TWS) API, Client Portal API, Excel API and more.

    #2
    Hello YD777,

    This is incorrect.

    Interactive Brokers send the actual real-time ticks and market data events to NinjaTrader. The actual market data events are what drive the price changes, and the actual ticks are used to build the bars on the chart.

    NinjaTrader does not create snapshots of real-time data.

    If the real-time data is being recorded as historical data, the actual received ticks are saved to a file. Again there are no snapshots created.

    Historical data is downloaded as is directly from the data provider (when the option to 'Get data from server' is enabled).

    This thread was posted in the NinjaScript Development section of the forums. Do you have a question about programming c# in a NinjaScript Strategy?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Interactive Brokers send the actual real-time ticks and market data events to NinjaTrader.
      Thanks for the quick reply.

      Since when did IB send real time ticks? Is that new, because they've been sending snapshots for as long as I've known them. They are often called "ticks", but in reality they are aggregates over a ~250 ms period. This topic is discussed on the internet (as well as these NT forums) many times, so please let me know if I've misunderstood something fundamental. But if not, can you look into my question on if NT will instead use the 5 second snapshots instead of the 250 ms snapshots?



      I think this topic is important to many NT users, as I found out from searching your forums. Problems with IB's short snapshots are discussed on these boards going back to 2008, and I think giving an option to use the 5 second snapshots would be a big benefit (if that option doesn't already exist somehow).

      Comment


        #4
        Hello YD777,

        I will not be able to comment on how Interactive Brokers aggregates their data.

        NinjaTrader receives the data as is from the data provider or broker. NinjaTrader (the platform) does not take snapshots of the incoming data. This is displayed as it is received.

        As NinjaTrader does not take snapshots of the data, I am unsure of how to address your inquiry.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChelseaB View Post
          Hello YD777,

          I will not be able to comment on how Interactive Brokers aggregates their data.

          NinjaTrader receives the data as is from the data provider or broker. NinjaTrader (the platform) does not take snapshots of the incoming data. This is displayed as it is received.

          As NinjaTrader does not take snapshots of the data, I am unsure of how to address your inquiry.
          I understand not being able to comment on how IB aggregates their data, but programmers of the NT platform should know what data they are handling when it arrives, right?

          The theme I get from NT is that you want to keep using the "ticks" that IB sends out, and you don't want your platform to use the 5 second "snapshots". My point is that neither are ticks, but you're just arbitrarily choosing to give the higher frequency snapshot the name "ticks". And if you have to choose between two types of snapshots, why choose the less accurate of the two, which is what is currently is being done. It would be nice to at least give users the option of which IB snapshot/"tick" to use.

          I take it that there has not been any progress on this topic since these threads and others like it:


          Comment


            #6
            Hello YD777,

            In the 46458 thread, please see Post #2.
            "NinjaTrader does not currently use snapshot data".

            In the 36764 thread, Matthew is clarifying that when receiving real-time data, a second chart can be built as the real-time data are ticks (seen as ticks by NinjaTrader) and these ticks can be used to create a second bar chart (though no historical data will load from IB).

            In the 11056 thread, please see Post #2.
            "Bars are built from their real-time tick feed, not the 5 second snapshot data"
            With this one, Ray is specifically talking about NinjaTrader and not talking about IB.

            NinjaTrader does not aggregate the data and does not take snapshots. The data received by NinjaTrader is the same data you will see in real-time on a chart or the Time & Sales window.

            The accuracy of the data is completely controlled by Interactive Brokers. When NinjaTrader receives this data, it is considered as real-time ticks by the NinjaTrader platform.

            Are you asking if it would be possible for NinjaTrader to change how Interactive Brokers provides data to the TWS API?

            I am happy to submit a feature request on your behalf to make a change. However, what would you like this request to be?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Thanks for bearing with me. But again, no matter what you want to label the data that IB is sending you, it's clear from the Interactive Brokers API documentation that it's snapshots. No, NT is not the one aggregating data and creating the snapshots, but we can't get anywhere on my inquiry if we keep going back to "NinjaTrader does not currently use snapshot data".

              NT is a great platform, but it's not magic and so there's no way to turn what IB sends you into "ticks". They are sending you snapshots, and you are using those snapshots. The fact that this is not acknowledged or known by the customer service makes any inquiry on the issue almost impossible and may explain why the it's still an issue despite being asked about back in 2008. I will likely still use the NT platform, but it would be very nice if the above could be understood and improved upon one day. Just make it an option to use the 5 second snapshots/bars that IB sends instead of the high frequency ones.

              Comment


                #8
                Hi YD777,

                I think I'm understanding. You are aware of a secondary way to receive data from the TWS API that uses a different data source. Is this correct?

                I'll submit a feature request to our development to use this alternate data source from the TWS API.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_ChelseaB View Post
                  Hi YD777,

                  I think I'm understanding. You are aware of a secondary way to receive data from the TWS API that uses a different data source. Is this correct?

                  I'll submit a feature request to our development to use this alternate data source from the TWS API.
                  Exactly. If NT could switch from treating the IB 250ms snapshots as ticks, and instead treat the IB 5 second snapshots as ticks, it would make everything more accurate and reliable. The TWS API functions that can do that are reqRealTimeBars() to request the data, and realtimeBar() to handle the data.

                  Thank you

                  Comment


                    #10
                    Hi YD777,

                    Thank you for the suggestion.

                    Your feature request to change the connection adapter of NinjaTrader to call 5 sec snapshot data from TWS is being tracked with ID# SFT-1567.

                    It is up to development to decide if and when a request will be implemented.

                    Please let me know if you have any other requests or suggestions for the NinjaTrader Platform.
                    Chelsea B.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by DJ888, 04-16-2024, 06:09 PM
                    4 responses
                    12 views
                    0 likes
                    Last Post DJ888
                    by DJ888
                     
                    Started by terofs, Today, 04:18 PM
                    0 responses
                    7 views
                    0 likes
                    Last Post terofs
                    by terofs
                     
                    Started by nandhumca, Today, 03:41 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post nandhumca  
                    Started by The_Sec, Today, 03:37 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post The_Sec
                    by The_Sec
                     
                    Started by GwFutures1988, Today, 02:48 PM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_Clayton  
                    Working...
                    X