PDA

View Full Version : Exception while looking at chart


heech
10-20-2009, 09:26 AM
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:


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.AddBarsInWorker ThreadBarsData(Object state)
at System.Threading._ThreadPoolWaitCallback.WaitCallb ack_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Objec t userData)
at System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWa itCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWa itCallback(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(Int3 2 index)
at Infragistics.Shared.SparseArray.GetItem(Int32 index, ICreateItemCallback createItemCallback)
at Infragistics.Win.UltraWinGrid.ScrollCountManagerSp arseArray.GetItem(Int32 index, Boolean create)
at Infragistics.Win.UltraWinGrid.RowsCollection.get_I tem(Int32 index)
at NinjaTrader.Strategy.StrategyGridDisplay.OnStrateg yStatus(Object sender, StatusChangedEventArgs e)
at NinjaTrader.Strategy.StatusChangedEventHandler.Inv oke(Object sender, StatusChangedEventArgs e)
at NinjaTrader.Strategy.StrategyBase.StoppedNow()
at System.Windows.Forms.Control.InvokeMarshaledCallba ckDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallba ckHelper(Object obj)
at System.Threading.ExecutionContext.runTryCode(Objec t userData)
at System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallba ck(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallba cks()


I'm new to submitting errors, by the way, so if you guys want this info in some other form... just let me know!

NinjaTrader_Bertrand
10-20-2009, 09:31 AM
Thanks heech, will attempt to reproduce here - correct the default instrument template would show you the regular hours only.

NinjaTrader_Dierk
10-20-2009, 09:33 AM
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

heech
10-20-2009, 09:47 AM
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.

NinjaTrader_Dierk
10-20-2009, 09:53 AM
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

heech
10-20-2009, 09:55 AM
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.

NinjaTrader_Dierk
10-20-2009, 09:58 AM
>> but I doubt you'll need them
Right but needed some data (which is no longer hosted by the DB file).