Class CandleExchange
Exchange attribute of CandleSymbol defines exchange identifier where data is
taken from to build the candles.
For more details see Javadoc.
public class CandleExchange : ICandleSymbolProperty
- Inheritance
-
CandleExchange
- Implements
- Inherited Members
Fields
Composite
Composite exchange where data is taken from all exchanges.
public static readonly CandleExchange Composite
Field Value
Default
Default exchange is Composite.
public static readonly CandleExchange Default
Field Value
Properties
ExchangeCode
Gets exchange code.
It is '\0'
for Composite exchange.
public char ExchangeCode { get; }
Property Value
Methods
ChangeAttributeForSymbol(string?)
Returns candle event symbol string with this candle exchange set.
public string? ChangeAttributeForSymbol(string? symbol)
Parameters
symbol
stringThe original candle event symbol.
Returns
- string
The candle event symbol string with this candle exchange set.
CheckInAttribute(CandleSymbol)
Internal method that initializes attribute in the candle symbol.
public void CheckInAttribute(CandleSymbol candleSymbol)
Parameters
candleSymbol
CandleSymbolThe candle symbol.
Exceptions
- InvalidOperationException
If used outside of internal initialization logic.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
- bool
true
if the specified object is equal to the current object; otherwise,false
.
GetAttributeForSymbol(string?)
Gets exchange attribute object of the given candle symbol string. The result is Default if the symbol does not have exchange attribute.
public static CandleExchange GetAttributeForSymbol(string? symbol)
Parameters
symbol
stringThe candle symbol string.
Returns
- CandleExchange
The exchange attribute object of the given candle symbol string.
GetHashCode()
Returns a hash code value for this object.
public override int GetHashCode()
Returns
- int
A hash code value for this object.
ToString()
Returns string representation of this exchange. It is the string "COMPOSITE" for Composite exchange or exchange character otherwise.
public override string ToString()
Returns
- string
The string representation.
ValueOf(char)
Returns exchange attribute object that corresponds to the specified exchange code character.
public static CandleExchange ValueOf(char exchangeCode)
Parameters
exchangeCode
charThe exchange code character.
Returns
- CandleExchange
The exchange attribute object.