コード例 #1
0
        protected override IndicatorResult ComputeByIndexImpl(int index)
        {
            decimal?middleBand = _smaIndicator.ComputeByIndex(index).Sma;
            decimal?sd         = _sdIndicator.ComputeByIndex(index).Sd;

            return(new IndicatorResult(Equity[index].DateTime, middleBand - SdCount * sd, middleBand, middleBand + SdCount * sd));
        }
コード例 #2
0
        protected override IndicatorResult ComputeByIndexImpl(int index)
        {
            var osc = _smaIndicator1.ComputeByIndex(index).Sma - _smaIndicator2.ComputeByIndex(index).Sma;

            return(new IndicatorResult(Equity[index].DateTime, osc));
        }