SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Fri Sep 21, 2018 9:40 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Sep 18, 2014 8:25 pm 
Offline

Joined: Thu Sep 18, 2014 5:32 pm
Posts: 28
I'm asking if anyone has sample code to maintain a trailing window of the past say N (small N around 10 to 100) trade prices.
Ideally this would be a 2D matrix of trades[symbol][Nth event ago].

I think the right way to update this is under the onTrade() event as a global variable.

Am i thinking about this the right way?


Top
 Profile  
 
PostPosted: Thu Sep 18, 2014 8:34 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6808
Well, yes, why not? You can just make it static, so that you can access it from all per instrument instances of InstrumentStrategy. You are talking about OQ2013 and InstrumentStrategy, right?

By the way if you are with OQ2013, I think you already have this matrix in the DataManager.

Regards,
Anton


Top
 Profile  
 
PostPosted: Mon Sep 22, 2014 2:29 am 
Offline

Joined: Thu Sep 18, 2014 5:32 pm
Posts: 28
solved


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

All times are UTC + 3 hours


Who is online

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