|
Lean
$LEAN_TAG$
|
Provides extension methods for Indicator More...
Static Public Member Functions | |
| static bool | Update (this IndicatorBase< IndicatorDataPoint > indicator, DateTime time, decimal value) |
| Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise More... | |
| static T | Of< T > (this T second, IIndicator first, bool waitForFirstToReady=true) |
| Configures the second indicator to receive automatic updates from the first by attaching an event handler to first.DataConsolidated More... | |
| static CompositeIndicator | WeightedBy< T, TWeight > (this IndicatorBase< T > value, TWeight weight, int period) |
| Creates a new CompositeIndicator such that the result will be average of a first indicator weighted by a second one More... | |
| static CompositeIndicator | Plus (this IndicatorBase left, decimal constant) |
| Creates a new CompositeIndicator such that the result will be the sum of the left and the constant More... | |
| static CompositeIndicator | Plus (this IndicatorBase left, IndicatorBase right) |
| Creates a new CompositeIndicator such that the result will be the sum of the left and right More... | |
| static CompositeIndicator | Plus (this IndicatorBase left, IndicatorBase right, string name) |
| Creates a new CompositeIndicator such that the result will be the sum of the left and right More... | |
| static CompositeIndicator | Minus (this IndicatorBase left, decimal constant) |
| Creates a new CompositeIndicator such that the result will be the difference of the left and constant More... | |
| static CompositeIndicator | Minus (this IndicatorBase left, IndicatorBase right) |
| Creates a new CompositeIndicator such that the result will be the difference of the left and right More... | |
| static CompositeIndicator | Minus (this IndicatorBase left, IndicatorBase right, string name) |
| Creates a new CompositeIndicator such that the result will be the difference of the left and right More... | |
| static CompositeIndicator | Over (this IndicatorBase left, decimal constant) |
| Creates a new CompositeIndicator such that the result will be the ratio of the left to the constant More... | |
| static CompositeIndicator | Over (this IndicatorBase left, IndicatorBase right) |
| Creates a new CompositeIndicator such that the result will be the ratio of the left to the right More... | |
| static CompositeIndicator | Over (this IndicatorBase left, IndicatorBase right, string name) |
| Creates a new CompositeIndicator such that the result will be the ratio of the left to the right More... | |
| static CompositeIndicator | Times (this IndicatorBase left, decimal constant) |
| Creates a new CompositeIndicator such that the result will be the product of the left and the constant More... | |
| static CompositeIndicator | Times (this IndicatorBase left, IndicatorBase right) |
| Creates a new CompositeIndicator such that the result will be the product of the left to the right More... | |
| static CompositeIndicator | Times (this IndicatorBase left, IndicatorBase right, string name) |
| Creates a new CompositeIndicator such that the result will be the product of the left to the right More... | |
| static ExponentialMovingAverage | EMA< T > (this IndicatorBase< T > left, int period, decimal? smoothingFactor=null, bool waitForFirstToReady=true) |
| Creates a new ExponentialMovingAverage indicator with the specified period and smoothingFactor from the left indicator More... | |
| static Maximum | MAX (this IIndicator left, int period, bool waitForFirstToReady=true) |
| Creates a new Maximum indicator with the specified period from the left indicator More... | |
| static Minimum | MIN< T > (this IndicatorBase< T > left, int period, bool waitForFirstToReady=true) |
| Creates a new Minimum indicator with the specified period from the left indicator More... | |
| static SimpleMovingAverage | SMA< T > (this IndicatorBase< T > left, int period, bool waitForFirstToReady=true) |
| Initializes a new instance of the SimpleMovingAverage class with the specified name and period from the left indicator More... | |
| static object | Of (PyObject second, PyObject first, bool waitForFirstToReady=true) |
| The methods overloads bellow are due to python.net not being able to correctly solve generic methods overload. More... | |
| static CompositeIndicator | WeightedBy (PyObject value, PyObject weight, int period) |
| Creates a new CompositeIndicator such that the result will be average of a first indicator weighted by a second one More... | |
| static ExponentialMovingAverage | EMA (PyObject left, int period, decimal? smoothingFactor=null, bool waitForFirstToReady=true) |
| Creates a new ExponentialMovingAverage indicator with the specified period and smoothingFactor from the left indicator More... | |
| static Maximum | MAX (PyObject left, int period, bool waitForFirstToReady=true) |
| Creates a new Maximum indicator with the specified period from the left indicator More... | |
| static Minimum | MIN (PyObject left, int period, bool waitForFirstToReady=true) |
| Creates a new Minimum indicator with the specified period from the left indicator More... | |
| static SimpleMovingAverage | SMA (PyObject left, int period, bool waitForFirstToReady=true) |
| Initializes a new instance of the SimpleMovingAverage class with the specified name and period from the left indicator More... | |
| static object | Over (PyObject left, decimal constant) |
| Creates a new CompositeIndicator such that the result will be the ratio of the left to the constant More... | |
| static object | Over (PyObject left, PyObject right, string name="") |
| Creates a new CompositeIndicator such that the result will be the ratio of the left to the right More... | |
| static object | Minus (PyObject left, decimal constant) |
| Creates a new CompositeIndicator such that the result will be the difference of the left and constant More... | |
| static object | Minus (PyObject left, PyObject right, string name="") |
| Creates a new CompositeIndicator such that the result will be the difference of the left and right More... | |
| static object | Times (PyObject left, decimal constant) |
| Creates a new CompositeIndicator such that the result will be the product of the left and the constant More... | |
| static object | Times (PyObject left, PyObject right, string name="") |
| Creates a new CompositeIndicator such that the result will be the product of the left to the right More... | |
| static object | Plus (PyObject left, decimal constant) |
| Creates a new CompositeIndicator such that the result will be the sum of the left and the constant More... | |
| static object | Plus (PyObject left, PyObject right, string name="") |
| Creates a new CompositeIndicator such that the result will be the sum of the left and right More... | |
Provides extension methods for Indicator
Definition at line 29 of file IndicatorExtensions.cs.
|
static |
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
| indicator | The indicator to be updated |
| time | The time associated with the value |
| value | The value to use to update this indicator |
Definition at line 39 of file IndicatorExtensions.cs.
|
static |
Configures the second indicator to receive automatic updates from the first by attaching an event handler to first.DataConsolidated
| second | The indicator that receives data from the first |
| first | The indicator that sends data via DataConsolidated even to the second |
| waitForFirstToReady | True to only send updates to the second if first.IsReady returns true, false to always send updates to second |
| T | : | IIndicator |
Definition at line 52 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be average of a first indicator weighted by a second one
| value | Indicator that will be averaged |
| weight | Indicator that provides the average weights |
| period | Average period |
| T | : | IBaseData | |
| TWeight | : | IndicatorBase<IndicatorDataPoint> |
Definition at line 74 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the sum of the left and the constant
value = left + constant
| left | The left indicator |
| constant | The addend |
Definition at line 120 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the sum of the left and right
value = left + right
| left | The left indicator |
| right | The right indicator |
Definition at line 135 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the sum of the left and right
value = left + right
| left | The left indicator |
| right | The right indicator |
| name | The name of this indicator |
Definition at line 150 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the difference of the left and constant
value = left - constant
| left | The left indicator |
| constant | The subtrahend |
Definition at line 164 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the difference of the left and right
value = left - right
| left | The left indicator |
| right | The right indicator |
Definition at line 179 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the difference of the left and right
value = left - right
| left | The left indicator |
| right | The right indicator |
| name | The name of this indicator |
Definition at line 194 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the ratio of the left to the constant
value = left/constant
| left | The left indicator |
| constant | The constant value denominator |
Definition at line 208 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the ratio of the left to the right
value = left/right
| left | The left indicator |
| right | The right indicator |
Definition at line 223 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the ratio of the left to the right
value = left/right
| left | The left indicator |
| right | The right indicator |
| name | The name of this indicator |
Definition at line 238 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the product of the left and the constant
value = left*constant
| left | The left indicator |
| constant | The constant value to multiple by |
Definition at line 252 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the product of the left to the right
value = left*right
| left | The left indicator |
| right | The right indicator |
Definition at line 267 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the product of the left to the right
value = left*right
| left | The left indicator |
| right | The right indicator |
| name | The name of this indicator |
Definition at line 282 of file IndicatorExtensions.cs.
|
static |
Creates a new ExponentialMovingAverage indicator with the specified period and smoothingFactor from the left indicator
| left | The ExponentialMovingAverage indicator will be created using the data from left |
| period | The period of the ExponentialMovingAverage indicators |
| smoothingFactor | The percentage of data from the previous value to be carried into the next value |
| waitForFirstToReady | True to only send updates to the second if left.IsReady returns true, false to always send updates |
| T | : | IBaseData |
Definition at line 294 of file IndicatorExtensions.cs.
|
static |
Creates a new Maximum indicator with the specified period from the left indicator
| left | The Maximum indicator will be created using the data from left |
| period | The period of the Maximum indicator |
| waitForFirstToReady | True to only send updates to the second if left.IsReady returns true, false to always send updates |
Definition at line 307 of file IndicatorExtensions.cs.
|
static |
Creates a new Minimum indicator with the specified period from the left indicator
| left | The Minimum indicator will be created using the data from left |
| period | The period of the Minimum indicator |
| waitForFirstToReady | True to only send updates to the second if left.IsReady returns true, false to always send updates |
| T | : | IBaseData |
Definition at line 318 of file IndicatorExtensions.cs.
|
static |
Initializes a new instance of the SimpleMovingAverage class with the specified name and period from the left indicator
| left | The SimpleMovingAverage indicator will be created using the data from left |
| period | The period of the SMA |
| waitForFirstToReady | True to only send updates to the second if first.IsReady returns true, false to always send updates to second |
| T | : | IBaseData |
Definition at line 330 of file IndicatorExtensions.cs.
|
static |
The methods overloads bellow are due to python.net not being able to correctly solve generic methods overload.
Configures the second indicator to receive automatic updates from the first by attaching an event handler to first.DataConsolidated
| second | The indicator that receives data from the first |
| first | The indicator that sends data via DataConsolidated even to the second |
| waitForFirstToReady | True to only send updates to the second if first.IsReady returns true, false to always send updates to second |
Definition at line 348 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be average of a first indicator weighted by a second one
| value | Indicator that will be averaged |
| weight | Indicator that provides the average weights |
| period | Average period |
Definition at line 363 of file IndicatorExtensions.cs.
|
static |
Creates a new ExponentialMovingAverage indicator with the specified period and smoothingFactor from the left indicator
| left | The ExponentialMovingAverage indicator will be created using the data from left |
| period | The period of the ExponentialMovingAverage indicators |
| smoothingFactor | The percentage of data from the previous value to be carried into the next value |
| waitForFirstToReady | True to only send updates to the second if left.IsReady returns true, false to always send updates |
Definition at line 378 of file IndicatorExtensions.cs.
|
static |
Creates a new Maximum indicator with the specified period from the left indicator
| left | The Maximum indicator will be created using the data from left |
| period | The period of the Maximum indicator |
| waitForFirstToReady | True to only send updates to the second if left.IsReady returns true, false to always send updates |
Definition at line 391 of file IndicatorExtensions.cs.
|
static |
Creates a new Minimum indicator with the specified period from the left indicator
| left | The Minimum indicator will be created using the data from left |
| period | The period of the Minimum indicator |
| waitForFirstToReady | True to only send updates to the second if left.IsReady returns true, false to always send updates |
Definition at line 404 of file IndicatorExtensions.cs.
|
static |
Initializes a new instance of the SimpleMovingAverage class with the specified name and period from the left indicator
| left | The SimpleMovingAverage indicator will be created using the data from left |
| period | The period of the SMA |
| waitForFirstToReady | True to only send updates to the second if first.IsReady returns true, false to always send updates to second |
Definition at line 417 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the ratio of the left to the constant
value = left/constant
| left | The left indicator |
| constant | The constant value denominator |
Definition at line 432 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the ratio of the left to the right
value = left/right
| left | The left indicator |
| right | The right indicator |
| name | The name of this indicator |
Definition at line 448 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the difference of the left and constant
value = left - constant
| left | The left indicator |
| constant | The subtrahend |
Definition at line 468 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the difference of the left and right
value = left - right
| left | The left indicator |
| right | The right indicator |
| name | The name of this indicator |
Definition at line 484 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the product of the left and the constant
value = left*constant
| left | The left indicator |
| constant | The constant value to multiple by |
Definition at line 504 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the product of the left to the right
value = left*right
| left | The left indicator |
| right | The right indicator |
| name | The name of this indicator |
Definition at line 520 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the sum of the left and the constant
value = left + constant
| left | The left indicator |
| constant | The addend |
Definition at line 540 of file IndicatorExtensions.cs.
|
static |
Creates a new CompositeIndicator such that the result will be the sum of the left and right
value = left + right
| left | The left indicator |
| right | The right indicator |
| name | The name of this indicator |
Definition at line 556 of file IndicatorExtensions.cs.