How can we call XAverage on an instrument loaded with DataLoader ?
When we create an instance of Xaverage, we "attach" it on datastream. For example :
Code: Select all
xavg = new XAverage(this, 2)
Code: Select all
private void ProcessData(List<Bar> Container, IDataLoaderResult Result)
{
Bar[] foo = Result.Data;
xavg.Price = foo; // Not allowed: Result.Data is not an ISeries
}
Regards.