Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exception while looking at chart

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

    Exception while looking at chart

    Hi,

    I had loaded a chart of HE 10-09, connected to IQFEED. The default instrument template seemed to be showing only the morning session (9:30 - 1 PM CST) instead of the full day session. I tried playing with the data series in the chart, by changing it to "default 24/7"... when I did this, Ninja caught an exception and crashed. Trace file shows:

    Code:
    2009-10-20 08:20:46:021 (IQFeed) Data.Bars.GetBarsNow: instrument='HE 10-09' from='2009-10-14' to='2009-10-14' period=1 Min splitAdjusted=False dividendAdjusted=False bars=0
    2009-10-20 08:20:46:209 (IQFeed) Data.Bars.GetBarsNow: instrument='HE 10-09' from='2009-10-14' to='2009-10-19' period=1 Min splitAdjusted=False dividendAdjusted=False bars=0
    2009-10-20 08:20:46:443 in OnUnhandledApplicationException
    2009-10-20 08:20:46:521 ********* exception trapped *********
    2009-10-20 08:20:46:521 Bar index needs to be greater/equal 0
    2009-10-20 08:20:46:521 System.Exception: Bar index needs to be greater/equal 0 ---> System.ArgumentException: Bar index needs to be greater/equal 0
       at NinjaTrader.Data.Bars.GetTime(Int32 barIndex)
       at NinjaTrader.Data.Bars.MergeBarsBefore(Bars barsToMerge, Bars barsExisting, DateTime from, DateTime to, Boolean isRawBars)
       at NinjaTrader.Data.Bars.GetBars(Instrument instrument, Period period, DateTime from, DateTime to, Session pSession, Boolean splitAdjusted, Boolean dividendAdjusted, Boolean forceReloadFromProvider, Boolean calculateContractOffset)
       --- End of inner exception stack trace ---
       at NinjaTrader.Data.Bars.GetBars(Instrument instrument, Period period, DateTime from, DateTime to, Session pSession, Boolean splitAdjusted, Boolean dividendAdjusted, Boolean forceReloadFromProvider, Boolean calculateContractOffset)
       at NinjaTrader.Data.Bars.GetBars(Instrument instrument, Period period, DateTime from, DateTime to, Session pSession, Boolean splitAdjusted, Boolean dividendAdjusted)
       at NinjaTrader.Gui.Chart.ChartControl.AddBarsInWorkerThreadBarsData(Object state)
       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
    2009-10-20 08:20:46:568 in OnUnhandledThreadException
    2009-10-20 08:20:46:615 ********* exception trapped *********
    2009-10-20 08:20:46:615 Index was outside the bounds of the array.
    2009-10-20 08:20:46:615    at Infragistics.Shared.SparseArray.ValidateIndex(Int32 index)
       at Infragistics.Shared.SparseArray.GetItem(Int32 index, ICreateItemCallback createItemCallback)
       at Infragistics.Win.UltraWinGrid.ScrollCountManagerSparseArray.GetItem(Int32 index, Boolean create)
       at Infragistics.Win.UltraWinGrid.RowsCollection.get_Item(Int32 index)
       at NinjaTrader.Strategy.StrategyGridDisplay.OnStrategyStatus(Object sender, StatusChangedEventArgs e)
       at NinjaTrader.Strategy.StatusChangedEventHandler.Invoke(Object sender, StatusChangedEventArgs e)
       at NinjaTrader.Strategy.StrategyBase.StoppedNow()
       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
    I'm new to submitting errors, by the way, so if you guys want this info in some other form... just let me know!

    #2
    Thanks heech, will attempt to reproduce here - correct the default instrument template would show you the regular hours only.

    Comment


      #3
      We're actually chasing this one quite a while, but haven't been able to reproduce.

      Would be really great if you could provide a step-by-step guide on how to reproduce. Either on a fresh setup or you needed to send me DB and the like...

      Thanks

      Comment


        #4
        Originally posted by NinjaTrader_Dierk View Post
        We're actually chasing this one quite a while, but haven't been able to reproduce.

        Would be really great if you could provide a step-by-step guide on how to reproduce. Either on a fresh setup or you needed to send me DB and the like...

        Thanks
        Dierk,

        I just reproduced it with a fresh start (without being connected to Iqfeed), I'll attach the workspace which has the chart already open.

        Ctrl-F to bring up the dataseries dialog.
        Session Template was "Use instrument default"; change to "Default 24/7"
        Click Okay.

        I get an immediate error at that point.
        Attached Files

        Comment


          #5
          Nope, can't reproduce. Could be several reasons:
          - our IQFeed account would not have data for HE
          - what timezone are you in?
          - I probably needed your DB as well

          In case you would be fine with taking next step then:
          - could you please send me your IQFeed credentials
          - zipped DB
          - what timezone are you in?

          To "dierk AT ninjatrader DOT com". Thanks

          Comment


            #6
            Dirk,

            I'm pacific standard time. I don't have a problem with sending you Iqfeed credentials, but I doubt you'll need them... I'm seeing the problem without connecting.

            Zipped database is too large to attach.. I'll email to you. Let me know if you still can't reproduce.

            Comment


              #7
              >> but I doubt you'll need them
              Right but needed some data (which is no longer hosted by the DB file).

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              620 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              359 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              105 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              562 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              566 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X