Class Candle
Candle event with open, high, low, close prices and other information for a specific period. Candles are build with a specified CandlePeriod using a specified CandlePrice type with a data taken from the specified CandleExchange from the specified CandleSession with further details of aggregation provided by CandleAlignment.
[EventCode(EventCodeNative.Candle)]
public class Candle : ITimeSeriesEvent, IIndexedEvent, ILastingEvent, IEventType
- Inheritance
-
Candle
- Implements
- Inherited Members
Constructors
Candle()
Initializes a new instance of the Candle class.
public Candle()
Candle(CandleSymbol)
Initializes a new instance of the Candle class with the specified event symbol.
public Candle(CandleSymbol eventSymbol)
Parameters
eventSymbol
CandleSymbolThe specified event symbol.
Fields
MaxSequence
Maximum allowed sequence value. Sequence
public const int MaxSequence = 4194303
Field Value
Properties
AskVolume
Gets or sets ask volume in this candle as floating number with fractions.
public double AskVolume { get; set; }
Property Value
BidVolume
Gets or sets bid volume in this candle as floating number with fractions.
public double BidVolume { get; set; }
Property Value
CandleSymbol
Gets or sets candle symbol object.
public CandleSymbol? CandleSymbol { get; set; }
Property Value
Close
Gets or sets the last (close) price of this candle.
public double Close { get; set; }
Property Value
Count
Gets or sets total number of original trade (or quote) events in this candle.
public long Count { get; set; }
Property Value
EventFlags
Gets or sets transactional event flags.
public int EventFlags { get; set; }
Property Value
EventSource
Gets a source identifier for this event, which is always DEFAULT for time-series events.
public IndexedEventSource EventSource { get; }
Property Value
EventSymbol
Gets or sets event symbol that identifies this event type DXFeedSubscription. Javadoc.
public string? EventSymbol { get; set; }
Property Value
EventTime
Gets or sets time when event was created or zero when time is not available. The difference, measured in milliseconds, between the event creation time and midnight, January 1, 1970 UTC or zero when time is not available. Javadoc.
public long EventTime { get; set; }
Property Value
High
Gets or sets the maximal (high) price of this candle.
public double High { get; set; }
Property Value
ImpVolatility
Gets or sets implied volatility.
public double ImpVolatility { get; set; }
Property Value
Index
Gets or sets unique per-symbol index of this time and sale event. Time and sale index is composed of Time and Sequence. Changing either time or sequence changes event index. Do not sets this value directly. Change Time and/or Sequence.
public long Index { get; set; }
Property Value
Low
Gets or sets the minimal (low) price of this candle.
public double Low { get; set; }
Property Value
Open
Gets or sets the first (open) price of this candle.
public double Open { get; set; }
Property Value
OpenInterest
Gets or sets open interest as floating number with fractions.
public double OpenInterest { get; set; }
Property Value
Sequence
Gets or sets sequence number of this event to distinguish events that have the same Time. This sequence number does not have to be unique and does not need to be sequential. Sequence can range from 0 to MaxSequence.
public int Sequence { get; set; }
Property Value
Exceptions
- ArgumentException
If sequence out of range.
Time
Gets or sets timestamp of the original event. Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
public long Time { get; set; }
Property Value
VWAP
Gets or sets volume-weighted average price (VWAP) in this candle.
Total turnover in this candle can be computed with VWAP * Volume
.
public double VWAP { get; set; }
Property Value
Volume
Gets or sets total volume in this candle as floating number with fractions.
Total turnover in this candle can be computed with VWAP * Volume
.
public double Volume { get; set; }
Property Value
Methods
BaseFieldsToString()
Returns string representation of this candle fields.
protected string BaseFieldsToString()
Returns
- string
The string representation.
ToString()
Returns string representation of this candle event.
public override string ToString()
Returns
- string
The string representation.