Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaTrader crashing on loading daily bars from Kinetick

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

    NinjaTrader crashing on loading daily bars from Kinetick

    I wanted to load daily data for single contract months for CL. Reason: wanted to analyze volume before selecting appropriate rollover dates.

    When downloading daily data via chart and specifiying "Bars to load (250)" instead of "Days to load (365)", NinjaTrader crashed. Workspace completely destroyed. Have to rebuild it entirely.

    Note that funny date 2006-04-23. Where does that come from?

    PHP Code:
    2010-07-27 22:38:41:093 (Kinetick – End Of Day (Free)) Data.Bars.GetBarsNowinstrument='CL 06-09' from='2008-06-30' to='2009-06-30' period=Daily splitAdjusted=False dividendAdjusted=False bars=0 session='Nymex Metals / Energy ETH'
    2010-07-27 22:38:49:406 (Kinetick – End Of Day (Free)) Data.Bars.GetBarsNowinstrument='CL 06-09' from='2008-05-30' to='2009-05-30' period=Daily splitAdjusted=False dividendAdjusted=False bars=0 session='Nymex Metals / Energy ETH'
    2010-07-27 22:39:44:734 (Kinetick – End Of Day (Free)) Data.Bars.GetBarsNowinstrument='CL 06-09' from='2009-07-03' to='2010-07-26' period=Daily splitAdjusted=False dividendAdjusted=False bars=0 session='Nymex Metals / Energy ETH'
    2010-07-27 22:39:46:015 (Kinetick – End Of Day (Free)) Data.Bars.GetBarsNowinstrument='CL 06-09' from='2010-07-27' to='2010-07-27' period=Daily splitAdjusted=False dividendAdjusted=False bars=0 session='Nymex Metals / Energy ETH'
    2010-07-27 22:39:46:750 (Kinetick – End Of Day (Free)) Data.Bars.GetBarsNowinstrument='CL 06-09' from='2006-04-23' to='2010-07-26' period=Daily splitAdjusted=False dividendAdjusted=False bars=0 session='Nymex Metals / Energy ETH'
    2010-07-27 22:39:48:609 in OnUnhandledApplicationException
    2010
    -07-27 22:39:48:859 ********* exception trapped *********
    2010-07-27 22:39:48:859 Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
    2010-07-27 22:39:48:859 System.NullReferenceExceptionDer Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
       
    bei System.Windows.Forms.Control.MarshaledInvoke(Control callerDelegate methodObject[] argsBoolean synchronous)
       
    bei System.Windows.Forms.Control.Invoke(Delegate methodObject[] args)
       
    bei NinjaTrader.Cbi.SynchronizeInvoke.Invoke(Delegate methodObject[] args)
       
    bei NinjaTrader.Gui.Chart.ChartControl.AddBarsInWorkerThreadBarsData(Object state)
       
    bei System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       
    bei System.Threading.ExecutionContext.runTryCode(Object userData)
       
    bei System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode codeCleanupCode backoutCodeObject userData)
       
    bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContextContextCallback callbackObject state)
       
    bei System.Threading.ExecutionContext.Run(ExecutionContext executionContextContextCallback callbackObject state)
       
    bei System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       
    bei System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state

    #2
    Another bug found, false months displayed on x-axis

    NT 7.0.0.19

    If you load daily data in mode "Bars to load"

    (1) first load a futures contract, for example CL 09-10 with 200 bars
    - > correctly displayed

    (2) now type CL 07-10 into the daily chart, and the data for CL 07-10 will be displayed
    -> cursor and data box show correct dates and values, but the x-axis shows the wrong months.

    Correct months will be only shown after the horizontal scroll bar of the chart has been moved.

    Comment


      #3
      Harry,

      What was your merge policy in use for the first post? Single-series chart? Was the instrument being loaded CL 09-10 and that data pull was just coming across as it pulled old contracts or were you really trying to load data for the old contract directly?
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Harry:

        I have created a batch file which makes a copy of the workspaces in a folder you can edit and then starts NT.

        Quickest way to restore workspaces without having to remember to copy.

        You can add more stuff to back-up to it if you want to. Remove the .txt ending (.bat can not be attached).
        Attached Files

        Comment


          #5
          Yes, I had changed that to single series chart, because I wanted to determine rollover dates and offsets ( if it backadjusted, I will never find the offsets, LOL).

          I was loading data for the old contract directly.

          If I load data directly for 24 contracts (back to the end of 2008), and I specify days to load, I have to change the end date permanently. So being lazy I thought that I can put in the end date of today and just define the number of bars to be loaded. In the end that worked well, but it produced that crash after I changed my logic from "days to load" to "bars to load".

          Problem is that NinjaTrader does not retrieve the correct offsets of the daily data by itself (another bug). So I determined volume crossover rollover dates, by comparing volume. Then wrote down close values for the date prior to rollover date and entered all offsets manually to the instrument manager.

          I am only doing this for CL, GC and BC, as the default rollover days cannot be reasonably used. For index, interest and currency futures rollover dates are known and pretty standard.

          Originally posted by NinjaTrader_Josh View Post
          Harry,

          What was your merge policy in use for the first post? Single-series chart? Was the instrument being loaded CL 09-10 and that data pull was just coming across as it pulled old contracts or were you really trying to load data for the old contract directly?

          Comment


            #6
            Harry,

            >> Yes, I had changed that to single series chart, because I wanted to determine rollover dates and offsets ( if it backadjusted, I will never find the offsets, LOL).

            I tried with DoNotMerge on all contracts from 06-09 to 08-10 with no crashes. Any additional information you can provide would be useful. Steps I used.

            1. DoNotMerge
            2. Connect Kinetick (EOD)
            3. Open CL 06-09 daily chart with Bars to Load = 250
            4. Type CL 07-09, wait for data to load
            5. Type CL 08-09, wait for data to load, etc.

            >> Problem is that NinjaTrader does not retrieve the correct offsets of the daily data by itself (another bug).

            I am not sure what you are referring to. The way offsets are calculated is fully documented and is based on rollover date. If you find you want to use a different rollover date that is not the default rollover date then you will simply need to change the rollover date and grab the new values. This would not be a bug, having it work off volume is a suggested functionality improvement that has already been noted.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              I tried with DoNotMerge on all contracts from 06-09 to 08-10 with no crashes. Any additional information you can provide would be useful. Steps I used.
              The crash only happened once, could not reproduce either.

              Originally posted by NinjaTrader_Josh View Post
              I am not sure what you are referring to. The way offsets are calculated is fully documented and is based on rollover date.
              When using different rollover dates, NinjaTrader should calculate offsets by using the difference of the closing prices (daily data) of the new and the old contract for the last session prior to rollover date. Somehow this does not happen, so I entered the offsets manually. I will further explore the behaviour to understand what happened.

              Comment


                #8
                Hi Harry !

                The bug you reported in post #2 is fixed and the fix will be available with the next update of NinjaTrader.

                Thanks for reporting,
                Christian
                ChristianSenior Software Developer

                Comment


                  #9
                  Good, quite reassuring. Will continue to annoy you.

                  Originally posted by NinjaTrader_Christian View Post
                  Hi Harry !

                  The bug you reported in post #2 is fixed and the fix will be available with the next update of NinjaTrader.

                  Thanks for reporting,
                  Christian

                  Comment


                    #10
                    Harry,

                    Calculating offsets locally only occurs when the following are true:

                    "When NinjaTrader will calculate the Offset value locally:

                    · The Offset field in the Contract Months window is blank
                    · Historical data exists in the database for both the new and old contract near the rollover date
                    · The MergeBackAdjusted policy must be selected in the Data tab of the Options menu
                    · You must be connected to your data provider and requesting data for the instrument"

                    Based on the information earlier in this thread requirement #3 likely was not met.

                    For the 2006 load request, this can occur based on the bars back loading logic. Because data requests have to be sent with a From and To date, NT has to guess how many days to load to accommodate the bars back requested. What happens is if NT guesses wrong the first time and not enough bars were loaded, it will drop down to tier 2 days to load which increases the # of days in hopes of getting enough bars to accommodate the bars back request this time. In this particular example, NT's first attempt only yielded 231 bars instead of 250. As more bars are needed, it now increases the days to load range to try and grab even more bars. After that load then enough bars are available to create the 250 bars back chart. Hopefully that makes sense.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Hi Josh,

                      thanks for the response,

                      I will check into this again. I guess I can just delete NinjaTrader.sdf and delete the CL data in the database to start the game (will be renaming the files). The fields should then be empty. Then change all the rollover dates, set MergePolicy to MergeBackadjusted and start loading data.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by SaltyCoffee, Today, 01:13 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post SaltyCoffee  
                      Started by FishTrade, 05-13-2024, 11:11 PM
                      3 responses
                      13 views
                      0 likes
                      Last Post FishTrade  
                      Started by Graci117, Yesterday, 09:02 PM
                      1 response
                      15 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by ETFVoyageur, Yesterday, 07:55 PM
                      0 responses
                      10 views
                      0 likes
                      Last Post ETFVoyageur  
                      Started by janio973, Yesterday, 07:24 PM
                      1 response
                      8 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Working...
                      X