Table of Contents

Class CandleAlignment

Namespace
DxFeed.Graal.Net.Events.Candles
Assembly
DxFeed.Graal.Net.dll

Candle alignment attribute of CandleSymbol defines how candle are aligned with respect to time.
For more details see Javadoc.

public class CandleAlignment : ICandleSymbolProperty
Inheritance
CandleAlignment
Implements
Inherited Members

Fields

AttributeKey

The attribute key that is used to store the value of CandleAlignment in a symbol string using methods of MarketEventSymbols class. The value of this constant is "a". The value that this key shall be set to is equal to the corresponding ToString().

public const string AttributeKey = "a"

Field Value

string

Default

Default alignment is Midnight.

public static readonly CandleAlignment Default

Field Value

CandleAlignment

Midnight

Align candles on midnight.

public static readonly CandleAlignment Midnight

Field Value

CandleAlignment

Session

Align candles on trading sessions.

public static readonly CandleAlignment Session

Field Value

CandleAlignment

Properties

Id

Gets CandleAlignment.CandleAlignmentId associated with this instance.

public CandleAlignment.CandleAlignmentId Id { get; }

Property Value

CandleAlignment.CandleAlignmentId

Name

Gets full name this CandleAlignment instance. For example, Midnight returns "Midnight", Session returns "Session".

public string Name { get; }

Property Value

string

Value

Returns string representation of this candle alignment. The string representation of candle alignment "m" for Midnight and "s" for Session.

public string Value { get; }

Property Value

string

The string representation.

Methods

ChangeAttributeForSymbol(string?)

Returns candle event symbol string with this candle alignment set.

public string? ChangeAttributeForSymbol(string? symbol)

Parameters

symbol string

The original candle event symbol.

Returns

string

The candle event symbol string with this candle alignment set.

CheckInAttribute(CandleSymbol)

Internal method that initializes attribute in the candle symbol.

public void CheckInAttribute(CandleSymbol candleSymbol)

Parameters

candleSymbol CandleSymbol

The candle symbol.

Exceptions

InvalidOperationException

If used outside of internal initialization logic.

GetAttributeForSymbol(string?)

Gets candle alignment of the given candle symbol string. The result is Default if the symbol does not have candle alignment attribute.

public static CandleAlignment GetAttributeForSymbol(string? symbol)

Parameters

symbol string

The candle symbol string.

Returns

CandleAlignment

The candle alignment of the given candle symbol string.

GetById(CandleAlignmentId)

Gets CandleAlignment associated with the specified CandleAlignment.CandleAlignmentId.

public static CandleAlignment GetById(CandleAlignment.CandleAlignmentId id)

Parameters

id CandleAlignment.CandleAlignmentId

The candle alignment id.

Returns

CandleAlignment

The candle alignment.

Exceptions

ArgumentException

If candle type id not exist.

NormalizeAttributeForSymbol(string?)

Normalizes candle symbol string with representation of the candle alignment attribute.

public static string? NormalizeAttributeForSymbol(string? symbol)

Parameters

symbol string

The candle symbol string.

Returns

string

Returns candle symbol string with the normalized representation of the candle alignment attribute.

Parse(string)

Parses string representation of candle alignment into object. Any string that was returned by ToString() can be parsed and case is ignored for parsing.

public static CandleAlignment Parse(string s)

Parameters

s string

The string representation of candle alignment.

Returns

CandleAlignment

The candle alignment.

Exceptions

ArgumentException

If the string representation is invalid.

ToFullString()

Returns full string representation of this candle alignment. It is contains attribute key and its value. For example, the full string representation of Midnight is "a=m".

public string ToFullString()

Returns

string

The string representation.

ToString()

Returns string representation of this candle alignment. The string representation of candle alignment "m" for Midnight and "s" for Session.

public override string ToString()

Returns

string

The string representation.