public override void SingleOutputUpdate(Bar data) { if (!_singleOutput) { throw new NotSupportedException( string.Format("Metric {0} has multiple output", _metric.GetType().Name)); } if (_acceptBarInput) { _sobiMetric.Update(data); } else { _soriMetric.Update(data.ClosePrice); } }
public override double SingleOutputUpdate(StockAnalysis.Share.Bar data) { if (!_singleOutput) { throw new NotSupportedException( string.Format("Metric {0} has multiple output", _metric.GetType().Name)); } if (!_acceptBarInput) { return(_soriMetric.Update(data.ClosePrice)); } else { return(_sobiMetric.Update(data)); } }