Class IndicatorsTrend
Collection of trend-based indicators.
Inheritance
Inherited Members
Namespace: TuringTrader.Indicators
Assembly: TuringTrader.Simulator.dll
Syntax
public static class IndicatorsTrend
Methods
| Improve this Doc View SourceDEMA(ITimeSeries<double>, int, CacheId, string, int)
Calculate Double Exponential Moving Average, as described here: https://en.wikipedia.org/wiki/Double_exponential_moving_average
Declaration
public static ITimeSeries<double> DEMA(this ITimeSeries<double> series, int n, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | averaging length |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | DEMA time series |
EMA(ITimeSeries<double>, int, CacheId, string, int)
Calculate Exponential Moving Average, as described here: https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
Declaration
public static ITimeSeries<double> EMA(this ITimeSeries<double> series, int n, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | averaging length |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | EMA time series |
EnvelopeDetector(ITimeSeries<double>, int, CacheId, string, int)
Calculate envelope of time series. For input values higher than the current output value, the output follows the input immediately. For input values lower, the output is an EMA of the input. The overall function is much like an envelope detector in electronics. https://en.wikipedia.org/wiki/Envelope_detector
Declaration
public static ITimeSeries<double> EnvelopeDetector(this ITimeSeries<double> series, int n, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | averaging length |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | envelope time series |
HMA(ITimeSeries<double>, int, CacheId, string, int)
Calculate Hull Moving Average, as described here: https://alanhull.com/hull-moving-average
Declaration
public static ITimeSeries<double> HMA(this ITimeSeries<double> series, int n, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | averaging length |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | HMA time series |
KAMA(ITimeSeries<double>, int, int, int, CacheId, string, int)
Calculate Kaufman's Adaptive Moving Average, as described here: https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:kaufman_s_adaptive_moving_average
Declaration
public static ITimeSeries<double> KAMA(this ITimeSeries<double> series, int erPeriod = 10, int fastEma = 2, int slowEma = 30, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | erPeriod | period for efficiency ratio |
int | fastEma | period for fast EMA |
int | slowEma | period for slow EMA |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | KAMA as time series |
MACD(ITimeSeries<double>, int, int, int, CacheId, string, int)
Calculate MACD, as described here: https://en.wikipedia.org/wiki/MACD
Declaration
public static IndicatorsTrend._MACD MACD(this ITimeSeries<double> series, int fast = 12, int slow = 26, int signal = 9, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | fast | fast EMA period |
int | slow | slow EMA period |
int | signal | signal line period |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
IndicatorsTrend._MACD |
SMA(ITimeSeries<double>, int, CacheId, string, int)
Calculate Simple Moving Average as described here: https://en.wikipedia.org/wiki/Moving_average#Simple_moving_average
Declaration
public static ITimeSeries<double> SMA(this ITimeSeries<double> series, int n, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | averaging length |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | SMA time series |
Sum(ITimeSeries<double>, int, CacheId, string, int)
Calculate rolling window sum.
Declaration
public static ITimeSeries<double> Sum(this ITimeSeries<double> series, int n, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input series |
int | n | averaging length |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | sum time series |
TEMA(ITimeSeries<double>, int, CacheId, string, int)
Calculate Triple Exponential Moving Average, as described here: https://en.wikipedia.org/wiki/Triple_exponential_moving_average
Declaration
public static ITimeSeries<double> TEMA(this ITimeSeries<double> series, int n, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | averaging length |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | TEMA time series |
WMA(ITimeSeries<double>, int, CacheId, string, int)
Calculate Weighted Moving Average as described here: https://en.wikipedia.org/wiki/Moving_average#Weighted_moving_average
Declaration
public static ITimeSeries<double> WMA(this ITimeSeries<double> series, int n, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | averaging length |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | WMA time series |
ZLEMA(ITimeSeries<double>, int, CacheId, string, int)
Calculate Ehlers' Zero Lag Exponential Moving Average, as described here: https://en.wikipedia.org/wiki/Zero_lag_exponential_moving_average
Declaration
public static ITimeSeries<double> ZLEMA(this ITimeSeries<double> series, int period, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | period | averaging length |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | ZLEMA as time series |