SmartQuant Discussion

OpenQuant and LINQ and BarSeries
Page 1 of 1

Author:  Dytiscus [ Sat Apr 17, 2010 10:31 pm ]
Post subject:  OpenQuant and LINQ and BarSeries

I was playing with the BarSeries object and was hoping to be able to do:
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?

Author:  scrubolio [ Wed Aug 25, 2010 10:27 pm ]
Post subject: 

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

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group