Class IndicatorsVolatility
Collection of volatility indicators.
Inheritance
Inherited Members
Namespace: TuringTrader.Indicators
Assembly: TuringTrader.Simulator.dll
Syntax
public static class IndicatorsVolatility
Methods
| Improve this Doc View SourceAverageTrueRange(Instrument, int, CacheId, string, int)
Calculate Averaged True Range, as described here: https://en.wikipedia.org/wiki/Average_true_range.
Declaration
public static ITimeSeries<double> AverageTrueRange(this Instrument series, int n, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
Instrument | 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> | ATR time series |
BollingerBands(ITimeSeries<double>, int, double, CacheId, string, int)
Calculate Bollinger Bands, as described here: https://traderhq.com/ultimate-guide-to-bollinger-bands/.
Declaration
public static IndicatorsVolatility._BollingerBands BollingerBands(this ITimeSeries<double> series, int n = 20, double stdev = 2, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | length of calculation |
double | stdev | width of bands |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
IndicatorsVolatility._BollingerBands | Bollinger Band time series |
FastStandardDeviation(ITimeSeries<double>, int, CacheId, string, int)
Calculate standard deviation, based on exponentially weighted filters. This is an incremental calculation, based on Tony Finch, which is very fast and efficient.
Declaration
public static ITimeSeries<double> FastStandardDeviation(this ITimeSeries<double> series, int n = 10, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | filtering 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> | variance as time series |
SemiDeviation(ITimeSeries<double>, int, CacheId, string, int)
Calculate standard deviation, based on exponentially weighted filters. This is an incremental calculation, based on Tony Finch, which is very fast and efficient.
Declaration
public static IndicatorsVolatility._SemiDeviation SemiDeviation(this ITimeSeries<double> series, int n = 10, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | filtering length |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
IndicatorsVolatility._SemiDeviation | variance as time series |
StandardDeviation(ITimeSeries<double>, int, CacheId, string, int)
Calculate historical standard deviation.
Declaration
public static ITimeSeries<double> StandardDeviation(this ITimeSeries<double> series, int n = 10, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | 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> | standard deviation as time series |
TrueRange(Instrument, CacheId, string, int)
Calculate True Range, non averaged, as described here: https://en.wikipedia.org/wiki/Average_true_range.
Declaration
public static ITimeSeries<double> TrueRange(this Instrument series, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
Instrument | series | input time series |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | True Range as time series |
UlcerIndex(ITimeSeries<double>, int, CacheId, string, int)
Calculate Ulcer Index.
Declaration
public static ITimeSeries<double> UlcerIndex(this ITimeSeries<double> series, int n = 10, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | length of observation window |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller's line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | Ulcer index as time series |
Volatility(ITimeSeries<double>, int, CacheId, string, int)
Calculate historical volatility, based on log-returns.
Declaration
public static ITimeSeries<double> Volatility(this ITimeSeries<double> series, int n = 10, CacheId parentId = null, string memberName = "", int lineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
ITimeSeries<double> | series | input time series |
int | n | 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> | volatility as time series |
VolatilityFromRange(ITimeSeries<double>, int, CacheId, string, int)
Calculate volatility estimate from recent trading range.
Declaration
public static ITimeSeries<double> VolatilityFromRange(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 | length of calculation window |
CacheId | parentId | caller cache id, optional |
string | memberName | caller's member name, optional |
int | lineNumber | caller line number, optional |
Returns
Type | Description |
---|---|
ITimeSeries<double> | volatility as time series |