SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Mon Oct 23, 2017 11:00 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Jun 22, 2017 2:23 pm 
Offline

Joined: Tue May 02, 2017 12:41 pm
Posts: 17
I am trying to run a strategy in realtime but I am getting the following error. I am subscribing to IB, EUR/USD.

EventManager::OnException Exception occured in EventHandler - 6/22/2017 12:21:54.082 SmartQuant.Level2Update - System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.SortedList`2.RemoveAt(Int32 index)
at SmartQuant.OrderBook.Set(Level2Update update)
at SmartQuant.DataManager.b3CmKVeqiD(Level2Update )
at SmartQuant.EventManager.GJOAP5yB81(Event )
at SmartQuant.EventManager.OnEvent(Event e)

Any thoughts?


Top
 Profile  
 
PostPosted: Fri Jun 23, 2017 1:47 am 
Offline

Joined: Thu Jun 08, 2006 3:56 pm
Posts: 537
Location: BC Canada
Not that you want to hear my thoughts on this error, but my guess is that your code is trying to reference beyond the limits of an array or series (a collection). Maybe you have a loop index, or an item index that is the wrong value.


Top
 Profile  
 
PostPosted: Fri Jun 23, 2017 5:55 pm 
Offline

Joined: Tue May 02, 2017 12:41 pm
Posts: 17
Actually the error is not coming from the strategy. The error pops up when I open QuoteMonitor for Interactive Brokers and add symbols to it.

Any thoughts!?

EventManager::OnException Exception occured in EventHandler - 1/1/0001 00:00:00.000 SmartQuant.Level2Update - System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.SortedList`2.RemoveAt(Int32 index)
at SmartQuant.OrderBook.Set(Level2Update update)
at SmartQuant.DataManager.b3CmKVeqiD(Level2Update )
at SmartQuant.EventManager.GJOAP5yB81(Event )
at SmartQuant.EventManager.OnEvent(Event e)


Top
 Profile  
 
PostPosted: Fri Jun 23, 2017 6:10 pm 
Offline

Joined: Thu Jun 08, 2006 3:56 pm
Posts: 537
Location: BC Canada
Good info, I guess it's not your strategy. And you're running OQ2014 (I think), which I have no experience with.

At least with my old version, adding and removing instruments from the Quote Monitor (or more common for me, to the real-time data importer) can be tricky and can cause errors. With the data importer, I'm always careful to only add/remove symbols when the data collector is not monitoring, else I get errors (maybe something like yours). Removing seems to be more of a problem.

The quote monitor doesn't have a button to start or stop it, so its behavior might be different. But my working theory is that both of them are monitoring, and they might be sharing some code to manage the list of symbols being monitored. All I can suggest is that you not remove symbols from the monitor. Instead, close the monitor and add the symbols back.

If it consistently happens after rebooting OQ, and if IB EURUSD is the first symbol being monitored, another long shot idea is that it might be in the instrument definition. Maybe the AltId group values are not right, or something like that. I'm sorry I can't be of more help.


Top
 Profile  
 
PostPosted: Tue Jun 27, 2017 4:26 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 375
Problem fixed,
try it with new release.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group