SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sat Sep 26, 2020 4:52 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: BarSeries.Add() method
PostPosted: Mon Aug 30, 2010 9:50 pm 
Offline

Joined: Sat Jul 24, 2004 12:40 am
Posts: 77
Location: Odessa, Florida
Suppose I have a barSeries and I add a bar as in:
Code:
// Add the bar to the serie
barSerie.Add(bar.BeginTime, bar.Open, bar.High, bar.Low, bar.Close, bar.Volume, bar.Size);

where bar represents a 1 minute bar which has not been completed yet. For instance, bar may be a 1 minute bar holding the data accumulated from 10:00:00 am to 10:00:45 am
A bit later, I get an updated price on the bar and now my bar holds data from 10:00:00 am to 10:00:48 am and I do:
Code:
// Add the updated bar to the serie
barSerie.Add(bar.BeginTime, bar.Open, bar.High, bar.Low, bar.Close, bar.Volume, bar.Size);

I would like to know if the BarSeries now has two bars (one representing data from 10:00:00 to 10:00:45, and one representing data from 10:00:00 to 10:00:48 or does the BarSeries simply replace the 10:00:00 - 10:00:45 bar with an updated bar going from 10:00:00 to 10:00:48?
I suspect the second possibility is the correct one, and if that is the case, are the indicators associated with the BarSeries properly updated?

Thank you in advance for any help on this topic


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 31, 2010 11:08 am 
Offline
Site Admin

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

BarSeries contains only one bar with the same BeginTime at the moment.
In other words, the old bar will be replaced with new one with the same datetime.

Regards,
Alex

_________________
SmartQuant Development Team


Top
 Profile  
 
 Post subject: BarSeries.Add() method
PostPosted: Thu Sep 02, 2010 6:57 pm 
Offline

Joined: Sat Jul 24, 2004 12:40 am
Posts: 77
Location: Odessa, Florida
Thank you very much. I thought that was the case.

Regards,
Henrick


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 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