Exemplo n.º 1
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();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Computes the next value of this indicator from the given state
 /// </summary>
 /// <param name="input">The input given to the indicator</param>
 protected override decimal ComputeNextValue(IBaseDataBar input)
 {
     _maximum.Update(input.Time, input.High);
     _mininum.Update(input.Time, input.Low);
     FastStoch.Update(input);
     StochK.Update(input);
     StochD.Update(input);
     return(FastStoch);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Computes the next value of this indicator from the given state
 /// </summary>
 /// <param name="input">The input given to the indicator</param>
 protected override decimal ComputeNextValue(DataPointBar input)
 {
     _maximum.Update(input.Occured, input.TimeZone, input.High);
     _mininum.Update(input.Occured, input.TimeZone, input.Low);
     FastStoch.Update(input);
     StochK.Update(input);
     StochD.Update(input);
     return(FastStoch);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Computes the next value of this indicator from the given state
 /// </summary>
 /// <param name="input">The input given to the indicator</param>
 protected override decimal ComputeNextValue(TradeBar input)
 {
     Maximum.Update(input.Time, input.High);
     Mininum.Update(input.Time, input.Low);
     FastStoch.Update(input);
     StochK.Update(input);
     StochD.Update(input);
     return(StochK * 100);
 }
Exemplo n.º 5
0
        /// <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>
        protected override DoubleArray Forward(long time, DoubleArray input)
        {
            _maximum.Update(time, input[HighIdx]);
            _minimum.Update(time, input[LowIdx]);
            FastStoch.Update(time, input);
            StochK.Update(time, input);
            StochD.Update(time, input);

            return(FastStoch.Current);
        }