dxFeed .Net API  5.13.0
dxFeed .Net API library intended to provide market data access for DX clients
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
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...
 

Private Types

enum  CandleAlignmentType { CandleAlignmentType.Midnight = 0, CandleAlignmentType.Session = 1 }
 

Private Member Functions

 CandleAlignment (CandleAlignmentType type, string value)
 

Private Attributes

readonly CandleAlignmentType type
 
readonly string value
 

Static Private Attributes

static readonly string ATTRIBUTE_KEY = "a"
 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 CandleAlignment.ToString() More...
 
static Dictionary< string, CandleAlignmentobjCash = new Dictionary<string, CandleAlignment>()
 

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 Enumeration Documentation

◆ CandleAlignmentType

Enumerator
Midnight 
Session 

Constructor & Destructor Documentation

◆ CandleAlignment()

com.dxfeed.api.candle.CandleAlignment.CandleAlignment ( CandleAlignmentType  type,
string  value 
)
inlineprivate

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

◆ ATTRIBUTE_KEY

readonly string com.dxfeed.api.candle.CandleAlignment.ATTRIBUTE_KEY = "a"
staticprivate

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 CandleAlignment.ToString()

◆ 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.

◆ objCash

Dictionary<string, CandleAlignment> com.dxfeed.api.candle.CandleAlignment.objCash = new Dictionary<string, CandleAlignment>()
staticprivate

◆ SESSION

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

Align candles on trading sessions.

◆ type

readonly CandleAlignmentType com.dxfeed.api.candle.CandleAlignment.type
private

◆ value

readonly string com.dxfeed.api.candle.CandleAlignment.value
private

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