NinjaScript > Language Reference > Indicator Methods >

Double Stochastics

Print this Topic Previous pageReturn to chapter overviewNext page

Description

Double Stochastics is a variation of the Stochastics indicator developed by William Blau.

 

 

Syntax

DoubleStochastics(int period)
DoubleStochastics(IDataSeries input, int period)

 

Returns default value
DoubleStochastics(int period)[int barsAgo]
DoubleStochastics(IDataSeries input, int period)[int barsAgo]

 

Returns %K value
DoubleStochastics(int period).K[int barsAgo]
DoubleStochastics(IDataSeries input, int period).K[int barsAgo]

 

 

Return Value

double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.

 

 

Parameters

input

Indicator source data (?)

period

Number of bars used in the calculation

 

 

Examples

// Prints the current value
double value = DoubleStochastics(10)[0];
Print("The current Double Stochastics value is " + value.ToString());

 

// Prints the current %K value
double value = DoubleStochastics(10).K[0];
Print("The current Double Stochastics %K value is " + value.ToString());

 

 

Source Code

You can view this indicator method source code by selecting the menu Tools > Edit NinjaScript > Indicator within the NinjaTrader Control Center window.