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
symbolstringThe 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
candleSymbolCandleSymbolThe 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
objobjectThe object to compare with the current object.
Returns
- bool
trueif 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
symbolstringThe 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
exchangeCodecharThe exchange code character.
Returns
- CandleExchange
The exchange attribute object.