LINQ and DataSeries
Author: ichechet
Creation Date: 11/12/2015 2:39 AM
profile picture

ichechet

#1
Greetings!

The LINQ technology is the best way to make queries like SQL. It can filter, aggregate, group, sort and so on.

The question: Is it possible to use DataSeries object for LINQ? Or should I convert it to List object?
profile picture

Eugene

#2
LINQ can already be used in code-based strategies after checking System.Core in "References..." dialog. For example:

Yahoo! Data - Change Perform Split Adjustment from inside Strategy?
...

While Wealth-Lab's DataSeries itself doesn't support LINQ, since v2014.12 of Community Components you could use the new extension method DataSeries.ToList(). For sample usage of LINQ for DataSeries, please see post #9 here:

How to read double array into DataSeries
profile picture

Eugene

#3
Just for convenience, documented ToList in the Wiki.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).