Table of Contents

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

period int

The period given to calculate the Fast %K

kPeriod int

The K period given to calculated the Slow %K

dPeriod int

The 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

name string

The name of this indicator.

period int

The period given to calculate the Fast %K

kPeriod int

The K period given to calculated the Slow %K

dPeriod int

The 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

IndicatorBase

IsReady

Gets a flag indicating when this indicator is ready and fully initialized

public override bool IsReady { get; }

Property Value

bool

StochD

Gets the value of the Slow Stochastics given Period D.

public IndicatorBase StochD { get; }

Property Value

IndicatorBase

StochK

Gets the value of the Slow Stochastics given Period K.

public IndicatorBase StochK { get; }

Property Value

IndicatorBase

WarmUpPeriod

Required period, in data points, for the indicator to be ready and fully initialized.

public override int WarmUpPeriod { get; }

Property Value

int

Methods

Forward(long, DoubleArray)

Computes the next value of this indicator from the given state

protected override DoubleArray Forward(long time, DoubleArray input)

Parameters

time long
input DoubleArray

The input given to the indicator

Returns

DoubleArray

Reset()

Resets this indicator to its initial state

public override void Reset()