コード例 #1
0
        /// <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(IBaseDataBar input)
        {
            var presentValue = (input.High + input.Low) / 2;

            SlowAo.Update(input.Time, presentValue);
            FastAo.Update(input.Time, presentValue);

            return(IsReady ? FastAo - SlowAo : 0m);
        }
コード例 #2
0
 /// <summary>
 /// Resets this indicator
 /// </summary>
 public override void Reset()
 {
     FastAo.Reset();
     SlowAo.Reset();
     base.Reset();
 }