SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Thu Oct 01, 2020 11:35 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Wed Aug 29, 2012 8:50 pm 
Offline

Joined: Thu Oct 13, 2011 7:11 pm
Posts: 41
OQ crashes when an un caught exception is raised.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 11:02 am 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
What exception do you mean? Could you provide a sample?

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 3:27 pm 
Offline

Joined: Thu Oct 13, 2011 7:11 pm
Posts: 41
Calling Ago or Last when there is no data.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 3:59 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
hmm... OQ shows error dialog in this case, but does not crash..
Attachment:
strategy_error.png
strategy_error.png [ 20.69 KiB | Viewed 4748 times ]

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 4:45 pm 
Offline

Joined: Thu Oct 13, 2011 7:11 pm
Posts: 41
Click on show details and abort.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 4:59 pm 
Offline

Joined: Thu Oct 13, 2011 7:11 pm
Posts: 41
If the error message says fetal it generally crashes.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 5:07 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Just don't click on abort then ;)


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 5:18 pm 
Offline

Joined: Thu Oct 13, 2011 7:11 pm
Posts: 41
The error window I get is different. When I get the above error window generally it does not crash. I have shown the window I get.


Attachments:
Error.png
Error.png [ 225.41 KiB | Viewed 4746 times ]
Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 5:20 pm 
Offline

Joined: Thu Oct 13, 2011 7:11 pm
Posts: 41
Easiest way to recreate a fatal error is to return Ago(0). Any fatal error will crash the OQ.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 5:46 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
On my side, this error looks like:
Attachment:
strategy_error_2.png
strategy_error_2.png [ 20.42 KiB | Viewed 4744 times ]


In which method of the strategy you call Bars.Ago?

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 6:10 pm 
Offline

Joined: Thu Oct 13, 2011 7:11 pm
Posts: 41
I am just returning Ago(0) within calculate in an indicator. Any way this is just to generate the error. This is not the only instance OQ crash on errors. Other errors also crash it. I mostly noticed this is with the calculate method. I draw the indicators also.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 6:20 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Could you provide us with OQ strategy code sample that generates an exception and crashes OQ? You are welcome to change any demo strategy code, so that we will be on the same page with you.

You can do many things in your custom indicator code. Basically you have full access to every bit of .NET and OQ application domain, so indeed it might be possible (and pretty easy) to generate a fatal exception which can not be catched safely.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 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