public double GetSeriesMovingAverageValue( Bars bars, SeriesType seriesType, int periods, MovingAverageType type, int index) { var series = bars.GetSeries(seriesType); var ma = _algo.Indicators.MovingAverage(series, periods, type); return(ma.Result[index]); }