コード例 #1
0
 /// <summary>
 ///     Computes the next value for this indicator from the given state.
 /// </summary>
 /// <param name="window">The window of data held in this indicator</param>
 /// <param name="input">The input value to this indicator on this time step</param>
 /// <returns>A new value for this indicator</returns>
 protected override decimal ComputeNextValue(IReadOnlyWindow <IndicatorDataPoint> window, IndicatorDataPoint input)
 {
     RollingSum.Update(input.Time, input.Value);
     return(RollingSum.Current.Value / window.Count);
 }
コード例 #2
0
 /// <summary>
 /// Resets this indicator to its initial state
 /// </summary>
 public override void Reset()
 {
     RollingSum.Reset();
     base.Reset();
 }