Exchange attribute of CandleSymbol defines exchange identifier where data is taken from to build the candles.
More...
#include <CandleExchange.hpp>
|
char | getExchangeCode () const noexcept |
| Returns exchange code.
|
|
std::string | changeAttributeForSymbol (const std::string &symbol) const noexcept override |
| Returns candle event symbol string with this exchange set.
|
|
std::string | toString () const noexcept |
| Returns string representation of this exchange.
|
|
|
static CandleExchange | valueOf (char exchangeCode) noexcept |
| Returns exchange attribute object that corresponds to the specified exchange code character.
|
|
static CandleExchange | getAttributeForSymbol (const std::string &symbol) noexcept |
| Returns exchange attribute object of the given candle symbol string.
|
|
Exchange attribute of CandleSymbol defines exchange identifier where data is taken from to build the candles.
Implementation details
This attribute is encoded in a symbol string with MarketEventSymbols.getExchangeCode and changeExchangeCode methods.
◆ changeAttributeForSymbol()
std::string dxfcpp::CandleExchange::changeAttributeForSymbol |
( |
const std::string & | symbol | ) |
const |
|
inlineoverridevirtualnoexcept |
Returns candle event symbol string with this exchange set.
- Parameters
-
symbol | The original candle event symbol. |
- Returns
- candle event symbol string with this exchange set.
Implements dxfcpp::CandleSymbolAttribute.
◆ getAttributeForSymbol()
static CandleExchange dxfcpp::CandleExchange::getAttributeForSymbol |
( |
const std::string & | symbol | ) |
|
|
inlinestaticnoexcept |
Returns exchange attribute object of the given candle symbol string.
The result is CandleExchange::DEFAULT if the symbol does not have exchange attribute.
- Parameters
-
symbol | candle symbol string. |
- Returns
- exchange attribute object of the given candle symbol string.
◆ getExchangeCode()
char dxfcpp::CandleExchange::getExchangeCode |
( |
| ) |
const |
|
inlinenoexcept |
◆ toString()
std::string dxfcpp::CandleExchange::toString |
( |
| ) |
const |
|
inlinenoexcept |
Returns string representation of this exchange.
It is the string "COMPOSITE"
for CandleExchange::COMPOSITE exchange or exchange character otherwise.
- Returns
- string representation of this exchange.
◆ valueOf()
static CandleExchange dxfcpp::CandleExchange::valueOf |
( |
char | exchangeCode | ) |
|
|
inlinestaticnoexcept |
Returns exchange attribute object that corresponds to the specified exchange code character.
- Parameters
-
exchangeCode | The exchange code character. |
- Returns
- exchange attribute object.