dxFeed .Net API  7.1.0
dxFeed .Net API library intended to provide market data access for DX clients
com.dxfeed.api.candle.CandleAlignment Class Reference

Candle alignment attribute of CandleSymbol defines how candle are aligned with respect to time. More...

Inheritance diagram for com.dxfeed.api.candle.CandleAlignment:
[legend]
Collaboration diagram for com.dxfeed.api.candle.CandleAlignment:
[legend]

Public Member Functions

override string ToString ()
 Returns string representation of this candle alignment. The string representation of candle alignment "m" for MIDNIGHT and "s" for SESSION. More...
 
string ToFullString ()
 Returns full string representation of this candle alignment. It is contains attribute key and its value. The full string representation of MIDNIGHT is "a=m" More...
 
string ChangeAttributeForSymbol (string symbol)
 Returns candle event symbol string with this candle alignment set. More...
 
void CheckInAttributeImpl (CandleSymbol candleSymbol)
 Internal method that initializes attribute in the candle symbol. More...
 
int GetId ()
 Get id of attribute value More...
 

Static Public Member Functions

static CandleAlignment Parse (string s)
 Parses string representation of candle alignment into object. Any string that was returned by ToString() can be parsed and case is ignored for parsing. More...
 
static CandleAlignment GetAttributeForSymbol (string symbol)
 Returns candle alignment of the given candle symbol string. The result is DEFAULT if the symbol does not have candle alignment attribute. More...
 
static string NormalizeAttributeForSymbol (string symbol)
 Returns candle symbol string with the normalized representation of the candle alignment attribute. More...
 

Static Public Attributes

static readonly CandleAlignment MIDNIGHT = new CandleAlignment(CandleAlignmentType.Midnight, "m")
 Align candles on midnight. More...
 
static readonly CandleAlignment SESSION = new CandleAlignment(CandleAlignmentType.Session, "s")
 Align candles on trading sessions. More...
 
static readonly CandleAlignment DEFAULT = MIDNIGHT
 Default alignment is MIDNIGHT. More...
 

Detailed Description

Candle alignment attribute of CandleSymbol defines how candle are aligned with respect to time.

Implementation details

This attribute is encoded in a symbol string with MarketEventSymbols.GetAttributeStringByKey, MarketEventSymbols.ChangeAttributeStringByKey, and MarketEventSymbols.RemoveAttributeStringByKey methods. The key to use with these methods is available via ATTRIBUTE_KEY constant. The value that this key shall be set to is equal to the corresponding CandleAlignment.ToString()

Member Function Documentation

◆ ChangeAttributeForSymbol()

string com.dxfeed.api.candle.CandleAlignment.ChangeAttributeForSymbol ( string  symbol)
inline

Returns candle event symbol string with this candle alignment set.

Parameters
symboloriginal candle event symbol
Returns
candle event symbol string with this candle alignment set.

Implements com.dxfeed.api.candle.ICandleSymbolAttribute.

◆ CheckInAttributeImpl()

void com.dxfeed.api.candle.CandleAlignment.CheckInAttributeImpl ( CandleSymbol  candleSymbol)
inline

Internal method that initializes attribute in the candle symbol.

Parameters
candleSymbolcandle symbol.
Exceptions
InvalidOperationExceptionObject is already initialized

Implements com.dxfeed.api.candle.ICandleSymbolAttribute.

◆ GetAttributeForSymbol()

static CandleAlignment com.dxfeed.api.candle.CandleAlignment.GetAttributeForSymbol ( string  symbol)
inlinestatic

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

Parameters
symbolcandle symbol string
Returns
candle alignment of the given candle symbol string.

◆ GetId()

int com.dxfeed.api.candle.CandleAlignment.GetId ( )
inline

Get id of attribute value

Returns
id of attribute value

◆ NormalizeAttributeForSymbol()

static string com.dxfeed.api.candle.CandleAlignment.NormalizeAttributeForSymbol ( string  symbol)
inlinestatic

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

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

◆ Parse()

static CandleAlignment com.dxfeed.api.candle.CandleAlignment.Parse ( string  s)
inlinestatic

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

Parameters
sstring representation of candle alignment.
Returns
candle alignment
Exceptions
ArgumentNullExceptionCandle alignment in string is unknown

◆ ToFullString()

string com.dxfeed.api.candle.CandleAlignment.ToFullString ( )
inline

Returns full string representation of this candle alignment. It is contains attribute key and its value. The full string representation of MIDNIGHT is "a=m"

Returns

◆ ToString()

override string com.dxfeed.api.candle.CandleAlignment.ToString ( )
inline

Returns string representation of this candle alignment. The string representation of candle alignment "m" for MIDNIGHT and "s" for SESSION.

Returns
string representation of this candle alignment.

Field Documentation

◆ DEFAULT

readonly CandleAlignment com.dxfeed.api.candle.CandleAlignment.DEFAULT = MIDNIGHT
static

Default alignment is MIDNIGHT.

◆ MIDNIGHT

readonly CandleAlignment com.dxfeed.api.candle.CandleAlignment.MIDNIGHT = new CandleAlignment(CandleAlignmentType.Midnight, "m")
static

Align candles on midnight.

◆ SESSION

readonly CandleAlignment com.dxfeed.api.candle.CandleAlignment.SESSION = new CandleAlignment(CandleAlignmentType.Session, "s")
static

Align candles on trading sessions.


The documentation for this class was generated from the following file: