Candle alignment attribute of CandleSymbol defines how candle are aligned with respect to time.
More...
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()
◆ CandleAlignmentType
Enumerator |
---|
Midnight | |
Session | |
◆ CandleAlignment()
com.dxfeed.api.candle.CandleAlignment.CandleAlignment |
( |
CandleAlignmentType |
type, |
|
|
string |
value |
|
) |
| |
|
inlineprivate |
◆ ChangeAttributeForSymbol()
string com.dxfeed.api.candle.CandleAlignment.ChangeAttributeForSymbol |
( |
string |
symbol | ) |
|
|
inline |
Returns candle event symbol string with this candle alignment set.
- Parameters
-
symbol | original 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
-
candleSymbol | candle symbol. |
- Exceptions
-
InvalidOperationException | Object 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
-
symbol | candle 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
-
symbol | candle 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
-
s | string representation of candle alignment. |
- Returns
- candle alignment
- Exceptions
-
ArgumentNullException | Candle 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.
◆ ATTRIBUTE_KEY
readonly string com.dxfeed.api.candle.CandleAlignment.ATTRIBUTE_KEY = "a" |
|
staticprivate |
◆ DEFAULT
◆ MIDNIGHT
Align candles on midnight.
◆ objCash
◆ SESSION
Align candles on trading sessions.
◆ type
◆ value
readonly string com.dxfeed.api.candle.CandleAlignment.value |
|
private |
The documentation for this class was generated from the following file: