SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Mon Apr 06, 2020 2:57 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Apr 14, 2007 10:32 pm 
Offline

Joined: Fri Mar 09, 2007 8:47 am
Posts: 20
Code:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at OpenQuant.Projects.UI.BarChart.Runner_Started(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at OpenQuant.Runner.EmitStarted()
   at OpenQuant.Runner.simulator_StateChanged(Object sender, EventArgs e)
   at SmartQuant.Simulation.Simulator.AFhdhegx9CoExKDiKLC)()
   at SmartQuant.Simulation.Simulator.AA()Id6lA()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()


Code:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at System.Windows.Forms.Control.Invoke(Delegate method)
   at OpenQuant.IDE.Runner_Stopped(Object sender, EventArgs e)
   at OpenQuant.Runner.EmitStopped()
   at OpenQuant.Runner.Do()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 15, 2007 7:19 am 
Offline

Joined: Thu Dec 08, 2005 7:05 pm
Posts: 438
Location: Sydney, Australia
Hi Extesy,

I can almost promise you that the SQ guys would like more information :)
- What where you doing, when did the exception occur (start end during running of a strategy, maybe when you did something else).
- What strategy where you running, what type of data.
- Did the exact same work in the previous version.
- If you run a different strategy does that result in the same error.

The index out of range part sounds like you are trying to access a index in a bar serries that does not exist, you want to check first if you have enough items in the bar serries. Aldo it probably is not that, looks more like something went wrong when accessing the strategy when in simulation mode.

Cheers,

-Mark


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 5:53 am 
Offline

Joined: Fri Feb 02, 2007 8:00 pm
Posts: 61
Location: USA
I got the same error by attempting to target panel 3 or higher on the chart without drawing something on panel 2.

//This will cause an exception if nothing is drawn on panel 2
Draw(timeseries,3);

//This works fine
Draw(timeseries,2);
Draw(timeseries,3);


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 17, 2007 11:49 am 
Offline

Joined: Wed Oct 08, 2003 1:06 pm
Posts: 833
Thanks for the bug report.

Fixed and will be available in the next OQ release.

Regards,
Sergey.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 17, 2007 6:26 pm 
Offline

Joined: Fri Mar 09, 2007 8:47 am
Posts: 20
OQ should better handle all kinds of exceptions from user's code. For example, if you create custom indicator that references non-existent bar from Input series (say, Input[-1]), OQ also crashes with IndexOutOfRange exception.


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 1 guest


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