IndicatorHelper

StockSharp.Algo.Indicators

Classe de extensão para indicadores.

Métodos

ApplyParameters
public static void ApplyParameters(IIndicator indicator, IEnumerable<KeyValuePair<string, object>> parameters)
IndicatorHelper.ApplyParameters(indicator, parameters)

Applies to , keyed by property name and matched case-insensitively. A part of a composite is reached by naming the path to it - K.Length, Macd.LongMa.Length. A key the indicator does not have, or a value it refuses, leaves its own default in place.

indicator
Indicator.
parameters
Parameters.
Clone
public static IIndicator Clone(IIndicator indicator)
result = IndicatorHelper.Clone(indicator)

Create a copy of the indicator.

indicator
Indicator.

Retorna: Copy.

CreateEmptyValue
public static IIndicatorValue CreateEmptyValue(IIndicator indicator, DateTime time)
result = IndicatorHelper.CreateEmptyValue(indicator, time)

Criar o vazio IIndicatorValue.

indicator
Indicador
time
Hora

Retorna: Vazio IIndicatorValue.

CreateIndicator
public static IIndicator CreateIndicator(IndicatorType type)
result = IndicatorHelper.CreateIndicator(type)

Criar indicador.

type
IndicatorType

Retorna: Indicador

ExcludeObsolete
public static IEnumerable<IndicatorType> ExcludeObsolete(IEnumerable<IndicatorType> types)
result = IndicatorHelper.ExcludeObsolete(types)

Excluir indicadores obsoletos.

types
Todos os tipos de indicadores.

Retorna: Colecção filtrada.

GetCurrentValue
public static decimal GetCurrentValue(IIndicator indicator)
result = IndicatorHelper.GetCurrentValue(indicator)

Para obter o valor atual do indicador.

indicator
Indicador.

Retorna: O valor atual.

GetCurrentValue``1
public static T GetCurrentValue<T>(IIndicator indicator)
result = IndicatorHelper.GetCurrentValue(indicator)

Para obter o valor atual do indicador.

indicator
Indicador.

Retorna: O valor atual.

GetFirstValue
public static decimal GetFirstValue(IIndicator indicator)
result = IndicatorHelper.GetFirstValue(indicator)

Para obter o primeiro valor do indicador.

indicator
Indicador.

Retorna: O valor atual.

GetNullableCurrentValue
public static decimal? GetNullableCurrentValue(IIndicator indicator)
result = IndicatorHelper.GetNullableCurrentValue(indicator)

Para obter o valor atual do indicador.

indicator
Indicador.

Retorna: O valor atual.

GetNullableFirstValue
public static decimal? GetNullableFirstValue(IIndicator indicator)
result = IndicatorHelper.GetNullableFirstValue(indicator)

Para obter o primeiro valor do indicador.

indicator
Indicador.

Retorna: O valor atual.

GetNullableValue
public static decimal? GetNullableValue(IIndicator indicator, int index)
result = IndicatorHelper.GetNullableValue(indicator, index)

Para obter o valor do indicador pelo índice (0 - último valor).

indicator
Indicador.
index
O índice de valor.

Retorna: Valor indicador.

GetOutputs
public static IReadOnlyList<ValueTuple<string, IIndicator>> GetOutputs(IIndicator indicator)
result = IndicatorHelper.GetOutputs(indicator)

The series produces: one entry for a plain indicator, one per innermost part for a composite.

indicator
Indicator.

Retorna: Series name paired with the part whose value it carries, in a stable order.

GetOutputValues
public static ValueTuple<decimal?[], int?> GetOutputValues(IIndicatorValue value, IReadOnlyList<IIndicator> parts)
result = IndicatorHelper.GetOutputValues(value, parts)

Reads one number per series out of .

value
What IIndicatorValue) returned. May be .
parts
The parts from IIndicator), in the same order.

Retorna: One entry per part, where that series has not formed yet, and the bars-back offset when a sparse indicator reports its value later than the candle it belongs to.

GetParameters
public static IEnumerable<PropertyInfo> GetParameters(Type indicatorType)
result = IndicatorHelper.GetParameters(indicatorType)

The properties of a caller may set: what the indicator declares itself, as opposed to the identity and drawing hints it inherits.

indicatorType
Indicator type.

Retorna: Settable parameter properties.

GetValue
public static decimal GetValue(IIndicator indicator, int index)
result = IndicatorHelper.GetValue(indicator, index)

Para obter o valor do indicador pelo índice (0 - último valor).

indicator
Indicador.
index
O índice de valor.

Retorna: Valor indicador.

GetValueType
public static Type GetValueType(Type indicatorType, bool isInput)
result = IndicatorHelper.GetValueType(indicatorType, isInput)

Obter o tipo de valor para o indicador especificado.

indicatorType
Tipo indicador.
isInput
É a entrada.

Retorna: Tipo de valor.

GetValue``1
public static T GetValue<T>(IIndicator indicator, int index)
result = IndicatorHelper.GetValue(indicator, index)

Para obter o valor do indicador pelo índice (0 - último valor).

indicator
Indicador.
index
O índice de valor.

Retorna: Valor indicador.

IsNonDecimalOutputValue
public static bool IsNonDecimalOutputValue(Type indicator)
result = IndicatorHelper.IsNonDecimalOutputValue(indicator)

Determina se o indicador é um valor de saída não-decimal.

indicator
Tipo indicador.

Retorna: Verificar o resultado.

NameInnerParts
private static Dictionary<IIndicator, string> NameInnerParts(IComplexIndicator complex)
result = IndicatorHelper.NameInnerParts(complex)

Names the inner parts after the properties exposing them - UpBand, SignalMa, Dx. Their own Name is localized display text, which would make the series keys change with the language the process is running in.

Preload
public static void Preload(IIndicator indicator, IEnumerable<ValueTuple<DateTime, object[]>> items)
IndicatorHelper.Preload(indicator, items)

Pré-carregamento em massa usando tuplas primitivas. As implementações podem sobrepor- se; lances predefinidos NotSupportedException.

indicator
Indicador
items
Sequência de (tempo, valores) onde os valores correspondem a ToValues output.
Process
public static IIndicatorValue Process(IIndicator indicator, object inputValue, DateTime time, bool isFinal)
result = IndicatorHelper.Process(indicator, inputValue, time, isFinal)

Renovar o indicador com novo valor.

indicator
Indicador.
inputValue
Valor de entrada.
time
Hora
isFinal
IsFinal

Retorna: IIndicatorValue.

Process
public static IIndicatorValue Process(IIndicator indicator, decimal value, DateTime time, bool isFinal)
result = IndicatorHelper.Process(indicator, value, time, isFinal)

Renovar o indicador com valor numérico.

indicator
Indicador.
value
Valor numérico.
time
Hora
isFinal
É o valor final (o indicador finalmente forma o seu valor e não será mais alterado neste ponto de tempo). O padrão é .

Retorna: O novo valor do indicador.

Process
public static IIndicatorValue Process(IIndicator indicator, ICandleMessage candle)
result = IndicatorHelper.Process(indicator, candle)

Renovar o indicador com o preço de fechamento de velas ClosePrice.

indicator
Indicador.
candle
Vela.

Retorna: O novo valor do indicador.

Process
public static IIndicatorValue Process(IIndicator indicator, IIndicatorValue input, decimal value)
result = IndicatorHelper.Process(indicator, input, value)

Renovar o indicador com valor numérico.

indicator
Indicador.
input
IIndicatorValue
value
Valor numérico.

Retorna: O novo valor do indicador.

Process``1
public static IIndicatorValue Process<TValue>(IIndicator indicator, ValueTuple<TValue, TValue> value, DateTime time, bool isFinal)
result = IndicatorHelper.Process(indicator, value, time, isFinal)

Renovar o indicador com par numérico.

indicator
Indicador.
value
O par de valores.
time
Hora
isFinal
Se o par final (o indicador finalmente forma seu valor e não será alterado neste ponto de tempo mais). O padrão é .

Retorna: O novo valor do indicador.

SetValue
public static IIndicatorValue SetValue(IIndicatorValue input, IIndicator indicator, decimal value)
result = IndicatorHelper.SetValue(input, indicator, value)

Substituir o valor de entrada do indicador por um novo (por exemplo, é recebido de outro indicador).

input
IIndicatorValue
indicator
Indicador.
value
Valor.

Retorna: Novo objeto, contendo valor de entrada.

ToCandle
public static ICandleMessage ToCandle(IIndicatorValue value)
result = IndicatorHelper.ToCandle(value)

Converter IIndicatorValue para ICandleMessage.

value
IIndicatorValue

Retorna: ICandleMessage

ToDecimal
public static decimal ToDecimal(IIndicatorValue value, Level1Fields? source)
result = IndicatorHelper.ToDecimal(value, source)

Converter IIndicatorValue para Decimal.

value
IIndicatorValue
source
Fonte de valor especificada no campo.

Retorna: Decimal

ToNullableDecimal
public static decimal? ToNullableDecimal(IIndicatorValue value, Level1Fields? source)
result = IndicatorHelper.ToNullableDecimal(value, source)

Converter IIndicatorValue para Decimal ou se o valor estiver vazio..

value
IIndicatorValue
source
Fonte de valor especificada no campo.

Retorna: Decimal ou se o valor estiver vazio.

TryCreateIndicator
public static IIndicator TryCreateIndicator(IndicatorType type)
result = IndicatorHelper.TryCreateIndicator(type)

Criar indicador.

type
IndicatorType

Retorna: Indicador

TryGetById
public static IndicatorType TryGetById(IIndicatorProvider provider, string id)
result = IndicatorHelper.TryGetById(provider, id)

Tente encontrar IndicatorType pelo identificador.

provider
IIndicatorProvider
id
Identificador.

Retorna: IndicatorType ou .

TryGetByType
public static IndicatorType TryGetByType(IIndicatorProvider provider, Type type)
result = IndicatorHelper.TryGetByType(provider, type)

Tente encontrar IndicatorType por tipo.

provider
IIndicatorProvider
type
Indicador

Retorna: IndicatorType ou .