dxFeed .Net API  7.1.0
dxFeed .Net API library intended to provide market data access for DX clients
com.dxfeed.api.candle.CandlePriceLevel Class Reference

Candle price level attribute of CandleSymbol defines how candles shall be aggregated in respect to price interval. The negative or infinite values of price interval are treated as exceptional. More...

Inheritance diagram for com.dxfeed.api.candle.CandlePriceLevel:
[legend]
Collaboration diagram for com.dxfeed.api.candle.CandlePriceLevel:
[legend]

Public Member Functions

double GetValue ()
 Returns a value of the candle price level More...
 
override string ToString ()
 
string ChangeAttributeForSymbol (string symbol)
 Returns candle event symbol string with this attribute set. More...
 
void CheckInAttributeImpl (CandleSymbol candleSymbol)
 Internal method that initializes attribute in the candle symbol. More...
 
string ToFullString ()
 Returns full string representation of this candle price level attribute. It is contains attribute key and its value. The full string representation of price level = 0.5 is "pl=0.5" More...
 
override bool Equals (object o)
 
override int GetHashCode ()
 

Static Public Member Functions

static CandlePriceLevel Parse (string s)
 Parses string representation of candle price level attribute into object. Any string that was returned by ToString() can be parsed More...
 
static CandlePriceLevel ValueOf (double value)
 Returns price level attribute object by value. More...
 
static CandlePriceLevel GetAttributeForSymbol (string symbol)
 Returns candle price level attribute of the given candle symbol string. The result is DEFAULT if the symbol does not have candle session attribute. More...
 
static string NormalizeAttributeForSymbol (string symbol)
 Returns candle symbol string with the normalized representation of the candle price level attribute. More...
 

Data Fields

const string ATTRIBUTE_KEY = "pl"
 

Static Public Attributes

static readonly CandlePriceLevel DEFAULT = new CandlePriceLevel(double.NaN)
 

Detailed Description

Candle price level attribute of CandleSymbol defines how candles shall be aggregated in respect to price interval. The negative or infinite values of price interval are treated as exceptional.

  • Price interval may be equal to zero. It means every unique price creates a particular candle to aggregate all events with this price for the chosen CandlePeriod.
  • Non-zero price level creates sequence of intervals starting from 0: ...,[-pl;0),[0;pl),[pl;2*pl),...,[n*pl,n*pl+pl). Events aggregated by chosen CandlePeriod and price intervals.

Implementation details

This attribute is encoded in a symbol string with MarketEventSymbols.getAttributeStringByKey, changeAttributeStringByKey, and 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 CandlePriceLevel.toString()

Member Function Documentation

◆ ChangeAttributeForSymbol()

string com.dxfeed.api.candle.CandlePriceLevel.ChangeAttributeForSymbol ( string  symbol)
inline

Returns candle event symbol string with this attribute set.

Parameters
symboloriginal candle event symbol.
Returns
candle event symbol string with this attribute set.

Implements com.dxfeed.api.candle.ICandleSymbolAttribute.

◆ CheckInAttributeImpl()

void com.dxfeed.api.candle.CandlePriceLevel.CheckInAttributeImpl ( CandleSymbol  candleSymbol)
inline

Internal method that initializes attribute in the candle symbol.

Parameters
candleSymbolcandleSymbol candle symbol.

Implements com.dxfeed.api.candle.ICandleSymbolAttribute.

◆ GetAttributeForSymbol()

static CandlePriceLevel com.dxfeed.api.candle.CandlePriceLevel.GetAttributeForSymbol ( string  symbol)
inlinestatic

Returns candle price level attribute of the given candle symbol string. The result is DEFAULT if the symbol does not have candle session attribute.

Parameters
symbolThe candle symbol string.
Returns
The candle price level attribute of the given candle symbol string.

◆ GetValue()

double com.dxfeed.api.candle.CandlePriceLevel.GetValue ( )
inline

Returns a value of the candle price level

Returns

◆ NormalizeAttributeForSymbol()

static string com.dxfeed.api.candle.CandlePriceLevel.NormalizeAttributeForSymbol ( string  symbol)
inlinestatic

Returns candle symbol string with the normalized representation of the candle price level attribute.

Parameters
symbolThe candle symbol string.
Returns
The candle symbol string with the normalized representation of the the candle price level attribute.

◆ Parse()

static CandlePriceLevel com.dxfeed.api.candle.CandlePriceLevel.Parse ( string  s)
inlinestatic

Parses string representation of candle price level attribute into object. Any string that was returned by ToString() can be parsed

Parameters
sThe string representation of candle candle price level attribute.
Returns
The candle price level attribute.

◆ ToFullString()

string com.dxfeed.api.candle.CandlePriceLevel.ToFullString ( )
inline

Returns full string representation of this candle price level attribute. It is contains attribute key and its value. The full string representation of price level = 0.5 is "pl=0.5"

Returns
The full string representation of a candle price level attribute

◆ ValueOf()

static CandlePriceLevel com.dxfeed.api.candle.CandlePriceLevel.ValueOf ( double  value)
inlinestatic

Returns price level attribute object by value.

Parameters
valueThe price level value
Returns
The candle price level attribute object.

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