Exemple #1
0
        /// <summary>
        /// Computes the Fast Stochastic %K.
        /// </summary>
        /// <param name="period">The period.</param>
        /// <param name="input">The input.</param>
        /// <returns>The Fast Stochastics %K value.</returns>
        private decimal ComputeFastStoch(int period, TradeBar input)
        {
            var fastStoch = Maximum.Samples >= period ? (input.Close - Mininum) / (Maximum - Mininum) : new decimal(0.0);

            SumFastK.Update(input.Time, fastStoch);
            return(fastStoch);
        }
Exemple #2
0
 /// <summary>
 /// Resets this indicator to its initial state
 /// </summary>
 public override void Reset()
 {
     FastStoch.Reset();
     StochK.Reset();
     StochD.Reset();
     SumFastK.Reset();
     SumSlowK.Reset();
     base.Reset();
 }