Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Realtime data

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

    Realtime data

    Hi

    I've got a problem with my realtime data: when I'm simulating a strategy in realtime, I get a completely different result than when I'm backtesting it right after the close of the stock market. Additionally, these both results are AGAIN different from the backtest, which I do the next day! I know, that the data can vary from the historical data, but the problem is, when I'm backtesting it manually (calculating by hand), I get the results from the historical backtest one day later, so the realtime data seems to be wrong.
    Can anybody help me? My broker is IB by the way.

    Thanks in advance,

    Sepp

    #2
    Hello Sepp,

    Unfortunately this can be as expected. Please see the link below for more information regarding discrepancies between backtesting and real-time.


    After the close of the stock market, I suggest to reload historical data for the time frame you intend to backtest (Tools-->Historical Data-->Reload).

    Subsequently perform the backtest. Check if the results resemble the results of the backtest you will perform the next day.
    JasonNinjaTrader Customer Service

    Comment


      #3
      But if I'd run this strategy in reality (with real money), on which results should I look - the realtime result (which is "wrong") or the historical backtest?
      Additionally, I understand, that there can be differences between realtime and historical due to the broker. But I checked the strategy manually with the data provided by the broker. Sometimes for example there is an entry 3 points under the low of the bar! Can't this be changed? Because it would be really frustrating to give up the whole strategy just becuase the data isn't accurately transferred...

      Regards,

      Sepp

      Comment


        #4
        Hello Sepp,

        Real-time, since you will run the strategy in real-time when trading live as well.

        I am not sure why orders are executed 3 points below the low of a bar. Once an order receives an 'accepted' or 'working' status it resides at the exchange or broker. You will need to check with them why the order was executed 3 points below the Low.

        If your strategy submits market orders, NinjaTrader will submit the order to the broker/exchange. It will be executed at the price the market is trading at that moment.
        JasonNinjaTrader Customer Service

        Comment


          #5
          So you say that's Ib's fault that NinjaTrader doesn't get the right real time data?
          I've reloaded the data after close and then it was alright. But before, there was for example a lose 3 points below the real close... very annoying... but if you say, that has to do with the broker, then I'll have to ask them I think.

          Regards,

          Sepp

          Comment


            #6
            Hello Sepp,

            NinjaTrader acts like a radio receiver in that we display data as it is provided.
            JasonNinjaTrader Customer Service

            Comment


              #7
              Ok, I've talked now with the IB support, and they couldn't help me right.
              But I'll ask my problem again: when I'm running NinjaTrader besides TWS during the trading hours, then both get charts which are quite different from each other (2 point lower close here, 1 point higher open there,...). But after reloading the historical data (and not changing anything like computer clock!), the NT chart looks exactely like the TWS chart and therefore different from before. Doesn't this mean, there are problems with charting the data right in NT?

              Regards,

              Sepp

              Comment


                #8
                Hello Sepp,

                Please see the forum thread at the link below.


                I suspect the data in TWS uses the 5 second snapshot data, which is also used when reloading historical data in NinjaTrader.
                JasonNinjaTrader Customer Service

                Comment


                  #9
                  Not quite understanding. I've understood now, that IB doesn't offer the real realtime data, so NinjaTrader will also be inaccurate. But therefore, the NT chart should at least be the same like in TWS. Why isn't this the case?
                  If I understadn frostengine correctly, there is no possibility to backtest a strategy with the real data neither if you use IB nor another data feed. But how can I get the real data? Or is it just, that IB doesn't provide realtime data, but the other vendors do? If so, do you have made any experience with eSignal? Perhaps, I'll subscribe there to get the real data and backtest the strategy with this data while trading with IB. Could I do this?

                  Regards,

                  Sepp

                  Comment


                    #10
                    Hello Sepp,

                    I suggest to check what data is used as per the TWS chart with IB. The NT chart is the same as the TWS chart once you reload historical data. This means the TWS chart is built from the same historical data and not from the real-time data you receive in NinjaTrader.

                    Yes, you could connect to eSignal in our software as well, since it is one of the supported data feed providers.
                    JasonNinjaTrader Customer Service

                    Comment


                      #11
                      Yes, but what I'm not understanding is how the chart data before reloading the chart in NT comes about. From where does NT get this data, when the data it gets from IB is showed only after reloading the data. That's my main problem.

                      Regards,

                      Sepp

                      Comment


                        #12
                        Hello MasterSepp,

                        Thank you for your reply.

                        Historical data is saved within the NinjaTrader database. When not connected, historical data will be loaded from here.
                        Note that real-time data loaded when NinjaTrader is streaming will also be saved in to the database.
                        KyleNinjaTrader Customer Service

                        Comment


                          #13
                          Ok, I checked it now again. I registrered for a demo version of quotes, provided by the CBOT itself. I compared it now with the data in IB's TWS and it fitted to every single point. So, the error has to be at NT. After reloading the data in NT, everything is fine. But before reloading the data, during the trading hours, NT gets completely different data - and this on 5 minute base! Could it be, that NT has delayed quotes from IB? I really have no idea, how this can be, but it is awful, because it would mean, that I had to trade with wrong realtime data, if it wouldn't be simulated!

                          Regards,

                          Sepp

                          Comment


                            #14
                            Hello Sepp,

                            Please see post #6 at the forum thread below.
                            JasonNinjaTrader Customer Service

                            Comment


                              #15
                              But how can NT build "real-time bars" from "real-time ticks", although tick by tick data isn't provided by IB?
                              But am I understanding correctly, that I can't do anything against this?

                              Regards,

                              Sepp

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by benmarkal, Yesterday, 12:52 PM
                              3 responses
                              22 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by helpwanted, Today, 03:06 AM
                              1 response
                              18 views
                              0 likes
                              Last Post sarafuenonly123  
                              Started by Brevo, Today, 01:45 AM
                              0 responses
                              11 views
                              0 likes
                              Last Post Brevo
                              by Brevo
                               
                              Started by aussugardefender, Today, 01:07 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post aussugardefender  
                              Started by pvincent, 06-23-2022, 12:53 PM
                              14 responses
                              244 views
                              0 likes
                              Last Post Nyman
                              by Nyman
                               
                              Working...
                              X