SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Wed Apr 26, 2017 10:47 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Jun 27, 2016 10:58 pm 
Offline

Joined: Thu Jun 09, 2016 8:25 pm
Posts: 15
Hello, I have created an instrument containing daily bar data. I wish to add intraday (1-min) data into the instrument.

I have found another answer, and would like to know how to apply this code. Specifically in the second line, are these the values you are inputting or the argument names?

Code:
Instrument instrument = InstrumentManager.Instruments["MSFT"];

Bar bar = new Bar(openDateTime. closeDateTime, instrument.Id, BarType.Time, 300, o, h, l, c, v);

DataManager.Save(bar);


Top
 Profile  
 
PostPosted: Tue Jun 28, 2016 11:22 am 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6750
Hi,

indeed these are values and these are names of variable in your example I guess.

double o = 10;
double h = 20;
...

Bar bar = new Bar(openDateTime. closeDateTime, instrument.Id, BarType.Time, 300, o, h, l, c, v);

BarType.Time is bar type enumerator

openDateTime closeDateTime are variables of .NET/c# DateTime type.

300 is the size of your bar.

Regards,
Anton


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