Table of Contents

Class CandleSession

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

Session attribute of CandleSymbol defines trading that is used to build the candles.
For more details see Javadoc.

public class CandleSession : ICandleSymbolProperty
Inheritance
CandleSession
Implements
Inherited Members

Fields

Any

All trading sessions are used to build candles.

public static readonly CandleSession Any

Field Value

CandleSession

AttributeKey

The attribute key that is used to store the value of CandleSession in a symbol string using methods of MarketEventSymbols class. class. The value of this constant is "tho", which is an abbreviation for "trading hours only". The value that this key shall be set to is equal to the corresponding ToString().

public const string AttributeKey = "tho"

Field Value

string

Default

Default trading session is Any.

public static readonly CandleSession Default

Field Value

CandleSession

Regular

Only regular trading session data is used to build candles.

public static readonly CandleSession Regular

Field Value

CandleSession

Properties

Id

Gets CandleSession.CandleSessionId associated with this instance.

public CandleSession.CandleSessionId Id { get; }

Property Value

CandleSession.CandleSessionId

Name

Gets full name this CandleSession instance. For example, Any returns "Any", Regular returns "Regular".

public string Name { get; }

Property Value

string

Value

Returns string representation of this candle session attribute. The string representation of candle session attribute is a lower case string that corresponds to its type name. For example, Any is represented as "false".

public string Value { get; }

Property Value

string

The string representation.

Methods

ChangeAttributeForSymbol(string?)

Returns candle event symbol string with this session attribute set.

public string? ChangeAttributeForSymbol(string? symbol)

Parameters

symbol string

The original candle event symbol.

Returns

string

The candle event symbol string with this session attribute 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 session of the given candle symbol string. The result is Default if the symbol does not have candle session attribute.

public static CandleSession GetAttributeForSymbol(string? symbol)

Parameters

symbol string

The candle symbol string.

Returns

CandleSession

The candle session attribute of the given candle symbol string.

NormalizeAttributeForSymbol(string?)

Normalizes candle symbol string with representation of the candle session 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 session attribute.

Parse(string)

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

public static CandleSession Parse(string s)

Parameters

s string

The string representation of candle price.

Returns

CandleSession

Returns instance of CandleSession.

Exceptions

ArgumentException

If the string representation is invalid.

ToFullString()

Returns full string representation of this candle session attribute. It is contains attribute key and its value. For example, the full string representation of Any is "tho=false".

public string ToFullString()

Returns

string

The string representation.

ToString()

Returns string representation of this candle session attribute. The string representation of candle session attribute is a lower case string that corresponds to its type name. For example, Any is represented as "false".

public override string ToString()

Returns

string

The string representation.