Double Stochastics

View as Markdown

Description

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

Syntax

DoubleStochastics(int period)

DoubleStochastics(ISeries\<double\> input, int period)

Returns default value

DoubleStochastics(int period)[int barsAgo]

DoubleStochastics(ISeries\<double\> input, int period)[int barsAgo]

Returns %K value

DoubleStochastics(int period).K[int barsAgo]

DoubleStochastics(ISeries\<double\> 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

ParameterDescription
inputIndicator source data (Series<T>)
periodNumber of bars used in the calculation

Examples

1// Prints the current value
2double value = DoubleStochastics(10)[0];
3Print("The current Double Stochastics value is " + value.ToString());
4
5
6// Prints the current %K value
7double value = DoubleStochastics(10).K[0];
8Print("The current Double Stochastics %K value is " + value.ToString());

Source Code

You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.