public IReadOnlyValueSeries <double> GetValueSeries(BarInputType inputType) { switch (inputType) { case BarInputType.Open: return(OpenValueSeries); case BarInputType.High: return(HighValueSeries); case BarInputType.Low: return(LowValueSeries); case BarInputType.Close: return(CloseValueSeries); case BarInputType.Volume: return(VolumeValueSeries); default: throw new NotImplementedException(); } }
public double GetValue(BarInputType inputType) { switch (inputType) { case BarInputType.Close: return(Close); case BarInputType.High: return(High); case BarInputType.Low: return(Low); case BarInputType.Open: return(Open); case BarInputType.Volume: return(Volume); default: throw new NotImplementedException(); } }
public IEnumerable <double> GetValues(BarInputType inputType) => _bars.Select(b => b.GetValue(inputType));
public double GetValue(BarInputType inputType, Index index) => this[index].GetValue(inputType);
public BarBasedValueSeries(IBars bars, BarInputType inputType) { Bars = bars; InputType = inputType; }