Show / Hide Table of Contents

Class IndicatorHelper

Вспомогательный класс для работы с индикаторами.

Inheritance
Object
IndicatorHelper
Namespace: StockSharp.Algo.Indicators
Assembly: StockSharp.Algo.dll
Syntax
public static class IndicatorHelper : Object

Methods

GetCurrentValue(IIndicator)

Получить текущее значение индикатора.

Declaration
public static Decimal GetCurrentValue(this IIndicator indicator)
Parameters
Type Name Description
IIndicator indicator

Indicator.

Returns
Type Description
Decimal

Текущее значение.

GetCurrentValue<T>(IIndicator)

Получить текущее значение индикатора.

Declaration
public static T GetCurrentValue<T>(this IIndicator indicator)
Parameters
Type Name Description
IIndicator indicator

Indicator.

Returns
Type Description
T

Текущее значение.

Type Parameters
Name Description
T

Тип значения.

GetInputValue<T>(IIndicatorValue)

Получить входное значение для IIndicatorValue.

Declaration
public static T GetInputValue<T>(this IIndicatorValue indicatorValue)
Parameters
Type Name Description
IIndicatorValue indicatorValue

Indicator value.

Returns
Type Description
T

Входное значение указанного типа.

Type Parameters
Name Description
T

Тип значения.

GetNullableCurrentValue(IIndicator)

Получить текущее значение индикатора.

Declaration
public static Nullable<Decimal> GetNullableCurrentValue(this IIndicator indicator)
Parameters
Type Name Description
IIndicator indicator

Indicator.

Returns
Type Description
Nullable<Decimal>

Текущее значение.

GetNullableValue(IIndicator, Int32)

Получить значение индикатора по индексу (0 - последнее значение).

Declaration
public static Nullable<Decimal> GetNullableValue(this IIndicator indicator, int index)
Parameters
Type Name Description
IIndicator indicator

Indicator.

Int32 index

Индекс значения.

Returns
Type Description
Nullable<Decimal>

Indicator value.

GetValue(IIndicator, Int32)

Получить значение индикатора по индексу (0 - последнее значение).

Declaration
public static Decimal GetValue(this IIndicator indicator, int index)
Parameters
Type Name Description
IIndicator indicator

Indicator.

Int32 index

Индекс значения.

Returns
Type Description
Decimal

Indicator value.

GetValue<T>(IIndicator, Int32)

Получить значение индикатора по индексу (0 - последнее значение).

Declaration
public static T GetValue<T>(this IIndicator indicator, int index)
Parameters
Type Name Description
IIndicator indicator

Indicator.

Int32 index

Индекс значения.

Returns
Type Description
T

Indicator value.

Type Parameters
Name Description
T

Тип значения.

GetValueType(Type, Boolean)

Получить тип данных для указанного индикатора.

Declaration
public static Type GetValueType(this Type indicatorType, bool isInput)
Parameters
Type Name Description
Type indicatorType

Indicator type.

Boolean isInput

Входящее.

Returns
Type Description
Type

Тип значения.

Process(IIndicator, Candle)

Обновить индикатор ценой закрытия свечи ClosePrice.

Declaration
public static IIndicatorValue Process(this IIndicator indicator, Candle candle)
Parameters
Type Name Description
IIndicator indicator

Indicator.

Candle candle

Свеча.

Returns
Type Description
IIndicatorValue

Новое значение индикатора.

Process(IIndicator, Decimal, Boolean)

Обновить индикатор числовым значением.

Declaration
public static IIndicatorValue Process(this IIndicator indicator, Decimal value, bool isFinal = true)
Parameters
Type Name Description
IIndicator indicator

Indicator.

Decimal value

Numeric value.

Boolean isFinal

Является ли значение окончательным (индикатор окончательно формирует свое значение и более не будет изменяться в данной точке времени). По умолчанию true.

Returns
Type Description
IIndicatorValue

Новое значение индикатора.

Process<TValue>(IIndicator, Tuple<TValue, TValue>, Boolean)

Обновить индикатор числовой парой.

Declaration
public static IIndicatorValue Process<TValue>(this IIndicator indicator, Tuple<TValue, TValue> value, bool isFinal = true)
Parameters
Type Name Description
IIndicator indicator

Indicator.

Tuple<TValue, TValue> value

Пара значений.

Boolean isFinal

Является ли пара окончательной (индикатор окончательно формирует свое значение и более не будет изменяться в данной точке времени). По умолчанию true.

Returns
Type Description
IIndicatorValue

Новое значение индикатора.

Type Parameters
Name Description
TValue

Тип значения.

☀
☾
In This Article
Back to top
Copyright © StockSharp.
☀
☾