Lean  $LEAN_TAG$
QuantConnect.Indicators.Stochastic Class Reference

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. More...

Inheritance diagram for QuantConnect.Indicators.Stochastic:
[legend]

Public Member Functions

 Stochastic (string name, int period, int kPeriod, int dPeriod)
 Creates a new Stochastics Indicator from the specified periods. More...
 
 Stochastic (int period, int kPeriod, int dPeriod)
 Creates a new Stochastic indicator from the specified inputs. More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => FastStoch.IsReady && StochK.IsReady && StochD.IsReady
 Gets a flag indicating when this indicator is ready and fully initialized More...
 

Protected Member Functions

override decimal ComputeNextValue (IBaseDataBar input)
 Computes the next value of this indicator from the given state More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.BarIndicator
 BarIndicator (string name)
 Creates a new TradeBarIndicator with the specified name More...
 

Properties

IndicatorBase< IBaseDataBarFastStoch [get]
 Gets the value of the Fast Stochastics K given Period. More...
 
IndicatorBase< IBaseDataBarStochK [get]
 Gets the value of the Slow Stochastics given Period K. More...
 
IndicatorBase< IBaseDataBarStochD [get]
 Gets the value of the Slow Stochastics given Period D. More...
 
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 
- Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Detailed Description

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.

Definition at line 27 of file Stochastics.cs.

Constructor & Destructor Documentation

◆ Stochastic() [1/2]

QuantConnect.Indicators.Stochastic.Stochastic ( string  name,
int  period,
int  kPeriod,
int  dPeriod 
)

Creates a new Stochastics Indicator from the specified periods.

Parameters
nameThe name of this indicator.
periodThe period given to calculate the Fast K
kPeriodThe K period given to calculated the Slow K
dPeriodThe D period given to calculated the Slow D

Definition at line 56 of file Stochastics.cs.

◆ Stochastic() [2/2]

QuantConnect.Indicators.Stochastic.Stochastic ( int  period,
int  kPeriod,
int  dPeriod 
)

Creates a new Stochastic indicator from the specified inputs.

Parameters
periodThe period given to calculate the Fast K
kPeriodThe K period given to calculated the Slow K
dPeriodThe D period given to calculated the Slow D

Definition at line 92 of file Stochastics.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.Stochastic.ComputeNextValue ( IBaseDataBar  input)
protected

Computes the next value of this indicator from the given state

Parameters
inputThe input given to the indicator

Definition at line 111 of file Stochastics.cs.

◆ Reset()

override void QuantConnect.Indicators.Stochastic.Reset ( )

Resets this indicator to its initial state

Definition at line 174 of file Stochastics.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.Stochastic.IsReady => FastStoch.IsReady && StochK.IsReady && StochD.IsReady

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

Definition at line 100 of file Stochastics.cs.

Property Documentation

◆ FastStoch

IndicatorBase<IBaseDataBar> QuantConnect.Indicators.Stochastic.FastStoch
get

Gets the value of the Fast Stochastics K given Period.

Definition at line 37 of file Stochastics.cs.

◆ StochK

IndicatorBase<IBaseDataBar> QuantConnect.Indicators.Stochastic.StochK
get

Gets the value of the Slow Stochastics given Period K.

Definition at line 42 of file Stochastics.cs.

◆ StochD

IndicatorBase<IBaseDataBar> QuantConnect.Indicators.Stochastic.StochD
get

Gets the value of the Slow Stochastics given Period D.

Definition at line 47 of file Stochastics.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.Stochastic.WarmUpPeriod
get

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

Definition at line 105 of file Stochastics.cs.


The documentation for this class was generated from the following file: