SmartQuant Discussion

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

All times are UTC + 3 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Dec 14, 2012 10:35 am 
Offline

Joined: Mon Nov 12, 2012 2:38 am
Posts: 59
I would like to load the position record in a local file before strategy starts and store the latest position into the file when strategy stops.
Because there will be more than one strategy and more than one instruments in my solution, I am afraid that many strategy instances will coflict when they access the same position record file. So I want to know, does all the strategy instances call function "OnStrategyStart" and "OnStrategyStop" in a one-by-one mode or a multi-threading mode? Thanks!


Top
 Profile  
 
PostPosted: Fri Dec 14, 2012 1:48 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
one-by-one, no worry.

Regards,
Anton


Top
 Profile  
 
PostPosted: Mon Jan 21, 2013 12:25 pm 
Offline

Joined: Mon Nov 12, 2012 2:38 am
Posts: 59
Thanks. Another question: I want to do some process after all the strategy instances(one strategy may have more than 1 instruments, so more than 1 instance) have called OnStrategyStart, where should I put my Code?


Top
 Profile  
 
PostPosted: Mon Jan 21, 2013 1:32 pm 
Offline

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

The only way to do this that I see is to count calls of OnStrategyStart method using Global or some static variable and then start your process from the last OnStrategyStart call.

Regards,
Sergey.


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

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 6 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