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);
            }
        }
Beispiel #2
0
        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));
            }
        }