Class Stochastic
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
This indicator computes the Slow Stochastics %K and %D. The Fast Stochastics %K is is computed by
(Current Close Price - Lowest Price of given Period) / (Highest Price of given Period - Lowest Price of given Period) multiplied by 100. Once the Fast Stochastics %K is calculated the Slow Stochastic %K is calculated by the average/smoothed price of of the Fast %K with the given period. The Slow Stochastics %D is then derived from the Slow Stochastics %K with the given period.
public class Stochastic : BarIndicator, IIndicator, IUpdatable
- Inheritance
-
Stochastic
- Implements
- Inherited Members
- Extension Methods
Constructors
Stochastic(int, int, int)
Creates a new Stochastic indicator from the specified inputs.
public Stochastic(int period, int kPeriod, int dPeriod)
Parameters
periodintThe period given to calculate the Fast %K
kPeriodintThe K period given to calculated the Slow %K
dPeriodintThe D period given to calculated the Slow %D
Stochastic(string, int, int, int)
Creates a new Stochastics Indicator from the specified periods.
public Stochastic(string name, int period, int kPeriod, int dPeriod)
Parameters
namestringThe name of this indicator.
periodintThe period given to calculate the Fast %K
kPeriodintThe K period given to calculated the Slow %K
dPeriodintThe D period given to calculated the Slow %D
Properties
FastStoch
Gets the value of the Fast Stochastics %K given Period.
public IndicatorBase FastStoch { get; }
Property Value
IsReady
Gets a flag indicating when this indicator is ready and fully initialized
public override bool IsReady { get; }
Property Value
StochD
Gets the value of the Slow Stochastics given Period D.
public IndicatorBase StochD { get; }
Property Value
StochK
Gets the value of the Slow Stochastics given Period K.
public IndicatorBase StochK { get; }
Property Value
WarmUpPeriod
Required period, in data points, for the indicator to be ready and fully initialized.
public override int WarmUpPeriod { get; }
Property Value
Methods
Forward(long, DoubleArray)
Computes the next value of this indicator from the given state
protected override DoubleArray Forward(long time, DoubleArray input)
Parameters
timelonginputDoubleArrayThe input given to the indicator
Returns
Reset()
Resets this indicator to its initial state
public override void Reset()