Table of Contents

Class CandleType

Namespace
DxFeed.Graal.Net.Events.Candles
Assembly
DxFeed.Graal.Net.dll

Type of the candle aggregation period constitutes CandlePeriod type together its actual Value. For more details see Javadoc.

public class CandleType
Inheritance
CandleType
Inherited Members

Fields

Day

Certain number of days.

public static readonly CandleType Day

Field Value

CandleType

Hour

Certain number of hours.

public static readonly CandleType Hour

Field Value

CandleType

Minute

Certain number of minutes.

public static readonly CandleType Minute

Field Value

CandleType

Month

Certain number of months.

public static readonly CandleType Month

Field Value

CandleType

OptExp

Certain number of option expirations.

public static readonly CandleType OptExp

Field Value

CandleType

Price

Certain price change, calculated according to the following rules:

  • high(n) - low(n) = price range
  • close(n) = high(n) or close(n) = low(n)
  • open(n+1) = close(n)
where n is the number of the bar.
public static readonly CandleType Price

Field Value

CandleType

PriceMomentum

Certain price change, calculated according to the following rules:

  • high(n) - low(n) = price range
  • close(n) = high(n) or close(n) = low(n)
  • open(n+1) = close(n) + tick size, if close(n) = high(n)
  • open(n+1) = close(n) - tick size, if close(n) = low(n)
where n is the number of the bar.
public static readonly CandleType PriceMomentum

Field Value

CandleType

PriceRenko

Certain price change, calculated according to the following rules:

  • high(n+1) - high(n) = price range or low(n) - low(n+1) = price range
  • close(n) = high(n) or close(n) = low(n)
  • open(n+1) = high(n), if high(n+1) - high(n) = price range
  • open(n+1) = low(n), if low(n) - low(n+1) = price range
where n is the number of the bar.
public static readonly CandleType PriceRenko

Field Value

CandleType

Second

Certain number of seconds.

public static readonly CandleType Second

Field Value

CandleType

Tick

Certain number of ticks.

public static readonly CandleType Tick

Field Value

CandleType

Volume

Certain volume of trades.

public static readonly CandleType Volume

Field Value

CandleType

Week

Certain number of weeks.

public static readonly CandleType Week

Field Value

CandleType

Year

Certain number of years.

public static readonly CandleType Year

Field Value

CandleType

Properties

Id

Gets CandleType.CandleTypeId associated with this instance.

public CandleType.CandleTypeId Id { get; }

Property Value

CandleType.CandleTypeId

Name

Gets full name this CandleType instance. For example, Tick (Value == "t") returns "Tick", Month (Value == "mo") returns "Month".

public string Name { get; }

Property Value

string

PeriodIntervalMillis

Gets candle type period in milliseconds (aggregation period) as closely as possible. Certain types like Second and Day span a specific number of milliseconds. Month, OptExp and Year are approximate. Candle type period of Tick, Volume, Price, PriceMomentum and PriceRenko is not defined and this method returns 0.

public long PeriodIntervalMillis { get; }

Property Value

long

Value

Returns string representation of this candle type. The string representation of candle type is the shortest unique prefix of the lower case string that corresponds to its Name. For example, Tick is represented as "t", while Month is represented as "mo" to distinguish it from Minute that is represented as "m".

public string Value { get; }

Property Value

string

The string representation.

Methods

GetById(CandleTypeId)

Gets CandleType associated with the specified CandleType.CandleTypeId.

public static CandleType GetById(CandleType.CandleTypeId id)

Parameters

id CandleType.CandleTypeId

The candle type id.

Returns

CandleType

The candle type.

Exceptions

ArgumentException

If candle type id not exist.

Parse(string)

Parses string representation of candle type into object. Any string that is a prefix of candle type Name can be parsed (including the one that was returned by ToString()) and case is ignored for parsing.

public static CandleType Parse(string s)

Parameters

s string

The string representation of candle type.

Returns

CandleType

The candle type.

Exceptions

ArgumentException

If the string representation is invalid.

ToString()

Returns string representation of this candle type. The string representation of candle type is the shortest unique prefix of the lower case string that corresponds to its Name. For example, Tick is represented as "t", while Month is represented as "mo" to distinguish it from Minute that is represented as "m".

public override string ToString()

Returns

string

The string representation.