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

Does NinjaTrader drop ticks real-time ?

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

    Does NinjaTrader drop ticks real-time ?

    Hi,

    I've developed a framework to record ticks arriving in OnMarketData.

    So i expect to see in my files at most the ticks arriving in Ninja, but I happen to see more, meaning all ticks are not processed by the ninja main engine, that stores ticks and plots bars.

    Ninja export file, I exported after the day

    20101123 153533;1182;33
    20101123 153533;1182;2

    20101123 153533;1182;1
    20101123 153533;1182.25;30
    20101123 153533;1182.25;1

    20101123 153534;1182.25;25
    20101123 153535;1182;1
    20101123 153535;1182;2


    My file, that record ticks in OnMarketData method (do not take the 2nd column in account)
    101123153533 1 1182 33
    101123153533 1 1182 2
    101123153533 1 1182 1
    101123153533 3 1182.25 30
    101123153533 3 1182.25 1

    101123153534 1 1182 1
    101123153534 3 1182.25 1
    101123153534 3 1182.25 5
    101123153534 3 1182.25 5
    101123153534 3 1182.25 25
    101123153535 1 1182 1
    101123153535 1 1182 2


    as you see in my file I have more ticks, the 1,1,5,5 before 25

    I ran Qcollector to get a backfill of the day, here is the QCollector file:
    15:35:33 1182 33
    15:35:33 1182 2
    15:35:33 1182 1
    15:35:33 1182,25 30
    15:35:33 1182,25 1

    15:35:34 1182 1
    15:35:34 1182,25 1
    15:35:34 1182,25 5
    15:35:34 1182,25 5
    15:35:34 1182,25 25
    15:35:35 1182 1
    15:35:35 1182 2


    So there are 4 ticks missing in Ninja database, but correctly captured by the engine running in OnMarketData()


    Example 2 :

    Ninja export :
    20101123 155915;1178.25;20
    20101123 155915;1178.25;2

    20101123 155915;1178.25;2

    20101123 155915;1178.25;1
    20101123 155915;1178.25;1
    20101123 155915;1178.25;3
    20101123 155915;1178.25;3
    20101123 155915;1178.25;3

    20101123 155915;1178.5;40
    20101123 155915;1178.5;34


    my file
    101123155915 1 1178.25 20
    101123155915 1 1178.25 2
    101123155915 1 1178.25 2
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 3
    101123155915 3 1178.25 3
    101123155915 3 1178.25 3

    101123155915 3 1178.25 3
    101123155915 3 1178.25 3
    101123155915 3 1178.25 5
    101123155915 3 1178.25 2
    101123155915 3 1178.25 93
    101123155915 3 1178.25 48
    101123155915 3 1178.25 60
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 3
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 2
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 2
    101123155915 3 1178.25 2
    101123155915 3 1178.25 2
    101123155915 3 1178.25 1
    101123155915 3 1178.25 1
    101123155915 3 1178.25 2
    101123155915 3 1178.25 1
    101123155915 3 1178.25 5
    101123155915 4 1178.5 29
    101123155915 4 1178.5 1
    101123155915 4 1178.5 1
    101123155915 4 1178.5 2
    101123155915 4 1178.5 2
    101123155915 4 1178.5 2
    101123155915 4 1178.5 1
    101123155915 4 1178.5 2
    101123155915 4 1178.5 2
    101123155915 4 1178.5 1
    101123155915 4 1178.5 2
    101123155915 4 1178.5 1
    101123155915 4 1178.5 1
    101123155915 4 1178.5 1
    101123155915 4 1178.5 1
    101123155915 4 1178.5 16
    101123155915 3 1178.5 1
    101123155915 3 1178.5 3
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 2
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 10
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 16
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 8
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 2
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 1
    101123155915 3 1178.5 10
    101123155915 3 1178.5 1
    101123155915 1 1178.5 5
    101123155915 1 1178.5 1
    101123155915 1 1178.5 1
    101123155915 1 1178.5 1
    101123155915 1 1178.5 40
    101123155915 1 1178.5 34


    Qcollector :
    23/11/10 15:59 1178,25 20
    23/11/10 15:59 1178,25 2
    23/11/10 15:59 1178,25 2

    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 3
    23/11/10 15:59 1178,25 3
    23/11/10 15:59 1178,25 3

    23/11/10 15:59 1178,25 3
    23/11/10 15:59 1178,25 3
    23/11/10 15:59 1178,25 5
    23/11/10 15:59 1178,25 2
    23/11/10 15:59 1178,25 93
    23/11/10 15:59 1178,25 48
    23/11/10 15:59 1178,25 60
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 3
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 2
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 2
    23/11/10 15:59 1178,25 2
    23/11/10 15:59 1178,25 2
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 2
    23/11/10 15:59 1178,25 1
    23/11/10 15:59 1178,25 5
    23/11/10 15:59 1178,5 29
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 2
    23/11/10 15:59 1178,5 2
    23/11/10 15:59 1178,5 2
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 2
    23/11/10 15:59 1178,5 2
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 2
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 16
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 3
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 2
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 10
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 16
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 8
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 2
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 10
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 5
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 1
    23/11/10 15:59 1178,5 40
    23/11/10 15:59 1178,5 34


    And there are other examples...
    So it seems all the ticks arrive to OnMarketData() on an indicator, but they do not all arrive to the main processing engine ..

    In the chart I send, there is an indicator that plots the difference between the full ninja volume of the day, and the full volume of my file for the day. Up to 15:58 the difference is virtually nil, but there are a few bursts of misses, and at 16:30 we're missing 3k contracts on ninja charts.

    If I click on "reload historical data", the charts updates, and all the error nearly disappear (we're left with -6 contracts difference)

    What do you think ?
    Attached Files

    #2
    Hi Gomi, NinjaTrader would not drop any ticks - we display the data we receive from the provider and relay it without processing. Are you sure you're comparing 'apples to apples', i.e. the same range of timestamps (considering NT's end of bar stamping) and events leading to the updates?

    Would you mind sharing the code and steps I would need to take a look here on our end for comparison?

    And also: which feed are you working on here?

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      OMG the "timestamp" again !

      Problem with GetNextBeginEnd => timestamp !


      Problem with volume on Renko charts => timestamp !


      And now problem on the Db => timestamp again !

      Here's an indicator you can test with :
      PHP Code:
              StreamWriter sw;

              protected 
      override void Initialize()
              {
                  
      Overlay                false;
              }

              protected 
      override void OnStartUp()
              {
                  
      sw=new StreamWriter(@"c:\temp\datatest.txt",false);
              }
              
              protected 
      override void OnBarUpdate()
              {}
              
              protected 
      override void OnMarketData(MarketDataEventArgs e)
              {
                  if (
      e.MarketDataType==MarketDataType.Last)
                      
      sw.WriteLine(e.Time.ToString("yyyyMMdd HHmmss;"+e.Price+";"+e.Volume));
              }
              
              protected 
      override void OnTermination()
              {
                  
      sw.Close();
                  
      sw.Dispose();
              } 
      This will write the ticks incoming in OnMarketUpdate in c:\temp\datatest.txt
      Then do a Ninja export and compare both files.

      Here are my results, on an excerpt of 15:30 to 15:35 :
      Pic : 1 missing ticks in ninja internal database
      Pic 2 : missing ticks in ninja internal database
      Pic 3 : timestamp differences
      Pic 4 : timestamp differences

      So it appears the ticks are all processed, because in real-time there is no problem, but some of them are not stored.

      Moreover, on some ticks the timestamp is different than what was recorded in OnMarketData . How can that be, as my esignal client timestamps the ticks, they have a unique timestamp. How can this be tampered ?
      Attached Files

      Comment


        #4
        Gomi, yes as we demonstrated in the other threads this would be an important concept to understand - eSignal data is natively timestamped, correct - if ticks are recorded with sub second resolution they would all be stored in their proper sequence but the timestamps showing in the HDM would be down to second only.

        I'll take a look and try running your indicators here for comparison.

        Also: reloading data normally produces a different tick formation, so subtle differences are to be expected here.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          Gomi, yes as we demonstrated in the other threads this would be an important concept to understand - eSignal data is natively timestamped, correct - if ticks are recorded with sub second resolution they would all be stored in their proper sequence but the timestamps showing in the HDM would be down to second only.
          .
          OK but why are the timestamps different in NT database and in the file made using OnMarketData ?

          Comment


            #6
            What would be the effect of differences between data displayed in live indicators and ticks recorded NT's database? Would it mainly affect backtesting or would it also affect the way indicators display data? I wonder if replay data (recorded not downloaded) is affected the same way?

            Comment


              #7
              I would like to know why its dropping ticks as well? I ran his test, compared it with both sierra charts and iRT.... sierra charts and Investor RT match, ninja on the other hand seems to drop ticks like gomi mentioned. Im using his gomvoltest.. and I see what he's talking about... So therefore its definitely reproducible...

              Reloading the data seems to correct the problem for the most part. It looks like as you do it in real time, it drops data....

              Gomi, could it be that you changed some settings on another chart or indicator? When you do that, ninja hangs for a few seconds as it recalculates the data and reloads the chart. This is a problem that ninja has had for a long time, and has never been fixed. That could be it but I've never verified it.
              When i even change the time interval from a 30 min to a 15 min on my chart with a look back period of 30 days, it causes prices to stop updating( even my dom freezes till the chart reloads) for about 2-3 seconds... That would be enough time for a few thousand cars to go off on the ES.

              What i mentioned above has nothing to do with how many charts i have loaded, or my computer, since I've tested it on different machines and with only one chart on. I have a very high end 64 bit machine with 8 GB of ram, and a quad core processor. I also have a 25Mbps internet connection. I really don't want to hear you guys blame my internet or computer.

              Comment


                #8
                Ninja

                I am here to say I am one of probably 100 or more users using the Gom indicators. I am also a person who is developing alongside this framework. IMO Gomi has helped ninja 1000% by providing an accurate back fill of bid/ask data. I would assume ninja will get to the bottom of this in a timely manner. Otherwise us coders for this area will be leaving in flocks. I was able to speak with vey helpful people at the traders expo in vegas last week. I hope this will be extended to the support area.

                I am sure i can get a tally of over 100 users who will be leaving this platform to wherever gomi goes. just let me know i will get a email list.

                Please look into this and let us know what is going on

                Comment


                  #9
                  Much as I like the NT framework, I would have left well over a year ago if it weren't for Gomi's work. He has single-handedly made your software a rival to Market Delta, and superior in several respects, without you having to invest any resources whatsoever, and despite the fact that he has had to overcome fundamental design issues. You ought to be paying him, rather than presenting obstacles to his work. I would leave without a second thought if he gives up on the platform.

                  And how about actually helping this work by disclosing the format of the market replay data so that we can access it directly and don't have to go to absurd lengths to gather missing data?

                  I would estimate there are far more than 100 serious users; only a small percentage of those I know post on the internet.

                  Comment


                    #10
                    It's because of people like Gomi that serious traders stay on Ninjatrader. The lousy programmers at Ninjatrader are the reason that traders go away from ninjatrader.

                    Comment


                      #11
                      Originally posted by playafh69 View Post
                      Gomi, could it be that you changed some settings on another chart or indicator? When you do that, ninja hangs for a few seconds as it recalculates the data and reloads the chart. This is a problem that ninja has had for a long time, and has never been fixed. That could be it but I've never verified it.
                      When i even change the time interval from a 30 min to a 15 min on my chart with a look back period of 30 days, it causes prices to stop updating( even my dom freezes till the chart reloads) for about 2-3 seconds... That would be enough time for a few thousand cars to go off on the ES.
                      I checked that. A lot of dropped ticks come from 15:30-16:00 Paris time, and at that time I'm getting the kids at school. So unless there is a F5-key-striking gremlin at my office, I would say this is not the issue.

                      Comment


                        #12
                        Originally posted by NinjaTrader_Bertrand View Post
                        Gomi, yes as we demonstrated in the other threads this would be an important concept to understand - eSignal data is natively timestamped, correct - if ticks are recorded with sub second resolution they would all be stored in their proper sequence but the timestamps showing in the HDM would be down to second only.

                        I'll take a look and try running your indicators here for comparison.

                        Also: reloading data normally produces a different tick formation, so subtle differences are to be expected here.
                        Bertrand,

                        Is there any "official" statement from NT management/developer on this issue?, do you guys recognize the "problem"?, is there an intention to fix it?, as a multiple paying customer I would like to have an answer to my questions.

                        I really think is a shame that people without asking nothing in return, help develop your application, make it better, give his work for FREE, increase the list of your client and NT doesn't take them seriously.

                        Comment


                          #13
                          Data integrity ought to be the highest priority for a trading application. How can a trader depend on Ninjatrader if the integrity of the data it uses is in question?

                          Already we know the recording/storage of bid/ask data has problems (ticks not saved in correct order, only stamped with 1 second resolution) which NT does not seem to place a very high priority on fixing. Thankfully Gomi has provided a data recording framework which fixes those problems, at least for indicators which use his GOM framework.

                          And now we're hearing that NT might be dropping ticks from the main processing engine? Hopefully the NT team will take this more seriously than they have the bid/ask data issue.

                          Comment


                            #14
                            I understand the frustration, but lets not point fingers, and call people lousy programmers. It's not gonna solve anything.

                            Lets just get to the bottom of this.

                            Comment


                              #15
                              NT support please work with Gomi to resolve tick dropping issues ........ you must know by now that his work is the main reason why you have the current group of subscribers .......

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by wzgy0920, 04-20-2024, 06:09 PM
                              2 responses
                              26 views
                              0 likes
                              Last Post wzgy0920  
                              Started by wzgy0920, 02-22-2024, 01:11 AM
                              5 responses
                              32 views
                              0 likes
                              Last Post wzgy0920  
                              Started by wzgy0920, Yesterday, 09:53 PM
                              2 responses
                              49 views
                              0 likes
                              Last Post wzgy0920  
                              Started by Kensonprib, 04-28-2021, 10:11 AM
                              5 responses
                              191 views
                              0 likes
                              Last Post Hasadafa  
                              Started by GussJ, 03-04-2020, 03:11 PM
                              11 responses
                              3,230 views
                              0 likes
                              Last Post xiinteractive  
                              Working...
                              X