SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sat Aug 15, 2020 8:07 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu May 17, 2012 4:50 pm 
Offline

Joined: Mon Aug 30, 2004 10:02 pm
Posts: 178
Location: AB/Ffm/Germany
Looking through the latest API documentation (OQ 3.5.0)
I found some classes which look very promising to me:

UserCommand
IDE
Scripts

I could not find any documentation explanation, examples...

How can I use these classes?


Top
 Profile  
 
PostPosted: Mon May 21, 2012 9:56 pm 
Offline

Joined: Mon Aug 30, 2004 10:02 pm
Posts: 178
Location: AB/Ffm/Germany
Any comments?

(.... I am waitin' ...)


Top
 Profile  
 
PostPosted: Tue May 22, 2012 10:54 am 
Offline

Joined: Wed Oct 08, 2003 1:06 pm
Posts: 833
Hi,

These features are new and not documented yet, but we will add some docs soon.

Meanwhile please ask if you need to implement something with the new API functions and we will post replies here and probably include this info in the docs/examples.

Regards,
Sergey.


Top
 Profile  
 
PostPosted: Mon May 28, 2012 1:10 pm 
Offline

Joined: Mon Aug 30, 2004 10:02 pm
Posts: 178
Location: AB/Ffm/Germany
Release Notes for 3.5.0 say:
* API: add UserCommand - an ability to send messages from OQ to the running strategy

I need something like this: A (custom) menu item in OQ, for example "Open Test Position" which sends a custom command to the strategy which performs some action (open a certain position in this case).

Release Notes for 3.4.1 say:
* API: an ability to stop script from its code

What I want to do: At about 23:30 PM I want to stop any running strategy and OQ and close it. How can I do this?


Top
 Profile  
 
PostPosted: Mon May 28, 2012 5:02 pm 
Offline

Joined: Wed Oct 08, 2003 1:06 pm
Posts: 833
Hi DrKoch,

Quote:
I need something like this: A (custom) menu item in OQ, for example "Open Test Position" which sends a custom command to the strategy which performs some action (open a certain position in this case).


Right-click the project node in the Solution Explorer and click "View User Commands", the User Commands window will pop up. Type any message in the window and click Send. Your system code should get the message in the OnUserCommand handler (so you should implement OnUserCommand method) and the code can parse the message and react on it in any way you need.

You can also open User Commands from the solution node, in this case all projects will receive commands (not only one as if you open User Commands from a given project node).

Quote:
I want to stop any running strategy and OQ and close it. How can I do this?


Create a new script, put reminder (using AddTimer method) in the Run method of the script and call OpenQuant.API.Engine.IDE.StopSolution(); in the OnTimer handler of the script.

There is no way to automatically close OQ from the script in the current version.

Regards,
Sergey.


Top
 Profile  
 
PostPosted: Wed Mar 06, 2013 11:17 am 
Offline

Joined: Mon Aug 30, 2004 10:02 pm
Posts: 178
Location: AB/Ffm/Germany
Is there a way to start OpenQuant (say from Scheduled Tasks) and make it Run a specific *script* :?:

I do not want to start a specific strategy, because I need the AddTimer() to stop the strategy.

I do not want to make this script "Is Startup" because I want to start OpenQuant otherwise
(say from Start menu) without running my special script.


Top
 Profile  
 
PostPosted: Wed Mar 06, 2013 4:12 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
No,

there is no way to do it.
as a solution, you can always run the script at startup, but check for necessity of execution in script code - check some flag, try to determine initiator of OQ process etc...

_________________
SmartQuant Development Team


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