IndicatorHelper

StockSharp.Algo.Indicators

Extension class for indicators.

Methods

CreateEmptyValue(IIndicator, DateTime) : IIndicatorValue

Create empty IIndicatorValue.

indicator
IIndicator
time
Time

Returns: Empty IIndicatorValue.

CreateIndicator(IndicatorType) : IIndicator

Create indicator.

type
IndicatorType

Returns: IIndicator

ExcludeObsolete(IEnumerable<IndicatorType>) : IEnumerable<IndicatorType>

Exclude obsolete indicators.

types
All indicator types.

Returns: Filtered collection.

GetCurrentValue(IIndicator) : T

To get the current value of the indicator.

indicator
Indicator.

Returns: The current value.

GetCurrentValue``1(IIndicator)

To get the current value of the indicator.

indicator
Indicator.

Returns: The current value.

GetFirstValue(IIndicator) : decimal

To get the first value of the indicator.

indicator
Indicator.

Returns: The current value.

GetNullableCurrentValue(IIndicator) : decimal?

To get the current value of the indicator.

indicator
Indicator.

Returns: The current value.

GetNullableFirstValue(IIndicator) : decimal?

To get the first value of the indicator.

indicator
Indicator.

Returns: The current value.

GetNullableValue(IIndicator, int) : decimal?

To get the indicator value by the index (0 - last value).

indicator
Indicator.
index
The value index.

Returns: Indicator value.

GetValue(IIndicator, int) : T

To get the indicator value by the index (0 - last value).

indicator
Indicator.
index
The value index.

Returns: Indicator value.

GetValueType(Type, bool) : Type

Get value type for specified indicator.

indicatorType
Indicator type.
isInput
Is input.

Returns: Value type.

GetValue``1(IIndicator, int)

To get the indicator value by the index (0 - last value).

indicator
Indicator.
index
The value index.

Returns: Indicator value.

IsNonDecimalOutputValue(Type) : bool

Determines whether the indicator is a non-decimal output value.

indicator
Indicator type.

Returns: Check result.

Preload(IIndicator, IEnumerable<ValueTuple<DateTime, object[]>>)

Bulk preload using primitive tuples. Implementations may override; default throws NotSupportedException.

indicator
IIndicator
items
Sequence of (time, values) where values correspond to ToValues output.
Process(IIndicator, decimal, DateTime, bool) : IIndicatorValue

To renew the indicator with numeric value.

indicator
Indicator.
value
Numeric value.
time
Time
isFinal
Is the value final (the indicator finally forms its value and will not be changed in this point of time anymore). Default is .

Returns: The new value of the indicator.

Process(IIndicator, ICandleMessage) : IIndicatorValue

To renew the indicator with candle closing price ClosePrice.

indicator
Indicator.
candle
Candle.

Returns: The new value of the indicator.

Process(IIndicator, IIndicatorValue, decimal) : IIndicatorValue

To renew the indicator with numeric value.

indicator
Indicator.
input
IIndicatorValue
value
Numeric value.

Returns: The new value of the indicator.

Process(IIndicator, object, DateTime, bool) : IIndicatorValue

To renew the indicator with new value.

indicator
Indicator.
inputValue
Input value.
time
Time
isFinal
IsFinal

Returns: IIndicatorValue.

Process``1(IIndicator, ValueTuple<T, T>, DateTime, bool)

To renew the indicator with numeric pair.

indicator
Indicator.
value
The pair of values.
time
Time
isFinal
If the pair final (the indicator finally forms its value and will not be changed in this point of time anymore). Default is .

Returns: The new value of the indicator.

SetValue(IIndicatorValue, IIndicator, decimal) : IIndicatorValue

To replace the indicator input value by new one (for example it is received from another indicator).

input
IIndicatorValue
indicator
Indicator.
value
Value.

Returns: New object, containing input value.

ToCandle(IIndicatorValue) : ICandleMessage

Convert IIndicatorValue to ICandleMessage.

value
IIndicatorValue

Returns: ICandleMessage

ToDecimal(IIndicatorValue, Level1Fields?) : decimal

Convert IIndicatorValue to Decimal.

value
IIndicatorValue
source
Field specified value source.

Returns: Decimal

ToNullableDecimal(IIndicatorValue, Level1Fields?) : decimal?

Convert IIndicatorValue to Decimal or if the value is empty..

value
IIndicatorValue
source
Field specified value source.

Returns: Decimal or if the value is empty.

TryCreateIndicator(IndicatorType) : IIndicator

Create indicator.

type
IndicatorType

Returns: IIndicator

TryGetById(IIndicatorProvider, string) : IndicatorType

Try find IndicatorType by identifier.

provider
IIndicatorProvider
id
Identifier.

Returns: IndicatorType or .

TryGetByType(IIndicatorProvider, Type) : IndicatorType

Try find IndicatorType by type.

provider
IIndicatorProvider
type
Indicator

Returns: IndicatorType or .