/// <summary> /// Computes the next value of this indicator from the given state /// </summary> /// <param name="time"></param> /// <param name="input">The input given to the indicator</param> /// <returns> /// A new value for this indicator /// </returns> protected override DoubleArray Forward(long time, DoubleArray input) { _standardDeviation.Update(time, input); LinearRegression.Update(time, input); return(LinearRegression.Current); }
/// <summary> /// Computes the next value of this indicator from the given state /// </summary> /// <param name="input">The input given to the indicator</param> /// <returns> /// A new value for this indicator /// </returns> protected override decimal ComputeNextValue(IndicatorDataPoint input) { _standardDeviation.Update(input); LinearRegression.Update(input); return(LinearRegression.Current.Value); }