Class Momentum
Collection of momentum indicators.
Inheritance
Inherited Members
Namespace: TuringTrader.SimulatorV2.Indicators
Assembly: TuringTrader.Simulator.dll
Syntax
public static class Momentum
Methods
| Improve this Doc View SourceADX(TimeSeriesAsset, int)
Calculate Average Directional Movement Index. https://en.wikipedia.org/wiki/Average_directional_movement_index
Declaration
public static TimeSeriesFloat ADX(this TimeSeriesAsset series, int n = 14)
Parameters
Type | Name | Description |
---|---|---|
TimeSeriesAsset | series | input OHLC time series |
int | n | smoothing length |
Returns
Type | Description |
---|---|
TimeSeriesFloat | ADX time series |
CCI(TimeSeriesAsset, int)
Calculate Commodity Channel Index of input time series, as described here: https://en.wikipedia.org/wiki/Commodity_channel_index
Declaration
public static TimeSeriesFloat CCI(this TimeSeriesAsset series, int n = 20)
Parameters
Type | Name | Description |
---|---|---|
TimeSeriesAsset | series | input time series (OHLC) |
int | n | averaging length |
Returns
Type | Description |
---|---|
TimeSeriesFloat | CCI time series |
CCI(TimeSeriesFloat, int)
Calculate Commodity Channel Index of input time series, as described here: https://en.wikipedia.org/wiki/Commodity_channel_index
Declaration
public static TimeSeriesFloat CCI(this TimeSeriesFloat series, int n = 20)
Parameters
Type | Name | Description |
---|---|---|
TimeSeriesFloat | series | input time series |
int | n | averaging length |
Returns
Type | Description |
---|---|
TimeSeriesFloat | CCI time series |
LinRegression(TimeSeriesFloat, int)
Calculate linear regression.
Declaration
public static Momentum.RegressionT LinRegression(this TimeSeriesFloat series, int n)
Parameters
Type | Name | Description |
---|---|---|
TimeSeriesFloat | series | input time series |
int | n | observation window |
Returns
Type | Description |
---|---|
Momentum.RegressionT | lin regression time series |
LogRegression(TimeSeriesFloat, int)
Calculate logarithmic regression.
Declaration
public static Momentum.RegressionT LogRegression(this TimeSeriesFloat series, int n)
Parameters
Type | Name | Description |
---|---|---|
TimeSeriesFloat | series | input series |
int | n | observation period |
Returns
Type | Description |
---|---|
Momentum.RegressionT | log regression time series |
RSI(TimeSeriesFloat, int)
Calculate Relative Strength Index, as described here: https://en.wikipedia.org/wiki/Relative_strength_index
Declaration
public static TimeSeriesFloat RSI(this TimeSeriesFloat series, int n = 14)
Parameters
Type | Name | Description |
---|---|---|
TimeSeriesFloat | series | input time series |
int | n | smoothing period |
Returns
Type | Description |
---|---|
TimeSeriesFloat | RSI time series |
StochasticOscillator(TimeSeriesAsset, int)
Calculate Stochastic Oscillator, as described here: https://en.wikipedia.org/wiki/Stochastic_oscillator
Declaration
public static Momentum.StochasticOscillatorT StochasticOscillator(this TimeSeriesAsset series, int n = 14)
Parameters
Type | Name | Description |
---|---|---|
TimeSeriesAsset | series | input time series (OHLC) |
int | n | oscillator period |
Returns
Type | Description |
---|---|
Momentum.StochasticOscillatorT | Stochastic Oscillator as time series |
StochasticOscillator(TimeSeriesFloat, int)
Calculate Stochastic Oscillator, as described here: https://en.wikipedia.org/wiki/Stochastic_oscillator
Declaration
public static Momentum.StochasticOscillatorT StochasticOscillator(this TimeSeriesFloat series, int n = 14)
Parameters
Type | Name | Description |
---|---|---|
TimeSeriesFloat | series | input time series |
int | n | oscillator period |
Returns
Type | Description |
---|---|
Momentum.StochasticOscillatorT | Stochastic Oscillator as time series |
TSI(TimeSeriesFloat, int, int)
Calculate True Strength Index of input time series, as described here: https://en.wikipedia.org/wiki/True_strength_index
Declaration
public static TimeSeriesFloat TSI(this TimeSeriesFloat series, int r = 25, int s = 13)
Parameters
Type | Name | Description |
---|---|---|
TimeSeriesFloat | series | input time series |
int | r | smoothing period for momentum |
int | s | smoothing period for smoothed momentum |
Returns
Type | Description |
---|---|
TimeSeriesFloat | TSI time series |
WilliamsPercentR(TimeSeriesAsset, int)
Calculate Williams %R, as described here: https://en.wikipedia.org/wiki/Williams_%25R
Declaration
public static TimeSeriesFloat WilliamsPercentR(this TimeSeriesAsset series, int n = 10)
Parameters
Type | Name | Description |
---|---|---|
TimeSeriesAsset | series | input time series (OHLC) |
int | n | period |
Returns
Type | Description |
---|---|
TimeSeriesFloat | Williams %R as time series |
WilliamsPercentR(TimeSeriesFloat, int)
Calculate Williams %R, as described here: https://en.wikipedia.org/wiki/Williams_%25R
Declaration
public static TimeSeriesFloat WilliamsPercentR(this TimeSeriesFloat series, int n = 10)
Parameters
Type | Name | Description |
---|---|---|
TimeSeriesFloat | series | input time series |
int | n | period |
Returns
Type | Description |
---|---|
TimeSeriesFloat | Williams %R as time series |