SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Tue Oct 20, 2020 12:09 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Apr 17, 2010 10:31 pm 
Offline

Joined: Sat Jul 24, 2004 12:40 am
Posts: 77
Location: Odessa, Florida
I was playing with the BarSeries object and was hoping to be able to do:
Code:
BarSeries bs = new ....
Bar b = bs.Last;
bs.LastOrDefault(b.Low < bs.Last.Low);

In order to find the last previous bar that was lower than the last bar.
But that did not work. I gather therefore that BarSeries is not implemented as a List<Bar>.
Is it possible that you might implement your collections by using List<> in the future so that we can bring the power of the List object as well as of LINQ to bear and allow SQL like searches on barSeries and other collections?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 25, 2010 10:27 pm 
Offline

Joined: Wed Mar 10, 2010 1:42 am
Posts: 63
you can create a simple method that iterates over all the bars in the barseries and then return the bar you are looking for.

or check out the LowestLow method. there are a couple of overloads for this. essentially they just return the lowest low of the barseries in a double variable format


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 5 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:  
Powered by phpBB® Forum Software © phpBB Group