|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dxfeed.event.candle.Candle
@EventType public final class Candle
Candle event with open, high, low, close prices and other information
for a specific period. Candles are build with a
specified aggregation period
using
a specified price type
with a data taken
from the specified exchange
from
the specified trading session
.
Field Summary | |
---|---|
static int |
MAX_SEQUENCE
Maximal allowed sequence value. |
Constructor Summary | |
---|---|
Candle()
Creates new candle with default values. |
|
Candle(CandleSymbol eventSymbol)
Creates new candle with the specified candle event symbol. |
Method Summary | |
---|---|
long |
getAskVolume()
Returns ask volume in this candle. |
long |
getBidVolume()
Returns bid volume in this candle. |
double |
getClose()
Returns the last (close) price of this candle. |
long |
getCount()
Returns total number of original trade (or quote) events in this candle. |
long |
getEventId()
Returns identifier of this event. |
CandleSymbol |
getEventSymbol()
Returns candle event symbol. |
double |
getHigh()
Returns the maximal (high) price of this candle. |
double |
getLow()
Returns the minimal (low) price of this candle. |
double |
getOpen()
Returns the first (open) price of this candle. |
int |
getSequence()
Returns sequence number of this event to distinguish events that has the same time . |
long |
getTime()
Returns timestamp of original event in milliseconds. |
long |
getVolume()
Returns total volume in this candle. |
double |
getVWAP()
Returns volume-weighted average price (VWAP) in this candle. |
void |
setAskVolume(long askVolume)
Changes ask volume in this candle. |
void |
setBidVolume(long bidVolume)
Changes bid volume in this candle. |
void |
setClose(double close)
Changes the last (close) price of this candle. |
void |
setCount(long count)
Changes total number of original trade (or quote) events in this candle. |
void |
setEventId(long eventId)
Changes identifier for this event. |
void |
setEventSymbol(CandleSymbol eventSymbol)
Changes candle event symbol. |
void |
setHigh(double high)
Changes the maximal (high) price of this candle. |
void |
setLow(double low)
Changes the minimal (low) price of this candle. |
void |
setOpen(double open)
Changes the first (open) price of this candle. |
void |
setSequence(int sequence)
Changes getSequence() sequence number} of this event. |
void |
setTime(long time)
Changes timestamp of event in milliseconds. |
void |
setVolume(long volume)
Changes total volume in this candle. |
void |
setVWAP(double vwap)
Changes volume-weighted average price (VWAP) in this candle. |
String |
toString()
Returns string representation of this candle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_SEQUENCE
setSequence(int)
,
Constant Field ValuesConstructor Detail |
---|
public Candle()
public Candle(CandleSymbol eventSymbol)
eventSymbol
- candle event symbol.Method Detail |
---|
public CandleSymbol getEventSymbol()
public void setEventSymbol(CandleSymbol eventSymbol)
eventSymbol
- candle event symbol.public long getEventId()
time
and sequence
.
Changing either time or sequence changes event identifier.
getEventId
in interface TimeSeriesEvent
public void setEventId(long eventId)
time
and sequence
,
invocation of this method changes time and sequence.
Do not use this method directly.
Change time
and/or sequence
.
eventId
- the event identifier.getEventId()
public long getTime()
getTime
in interface TimeSeriesEvent
System.currentTimeMillis()
public void setTime(long time)
time
- timestamp in milliseconds.getTime()
public int getSequence()
time
. This sequence number does not have to be unique and
does not need to be sequential. Sequence can range from 0 to MAX_SEQUENCE
.
public void setSequence(int sequence)
getSequence()
sequence number} of this event.
sequence
- the sequence.
IllegalArgumentException
- if sequence is below zero or above MAX_SEQUENCE
.getSequence()
public long getCount()
public void setCount(long count)
count
- total number of original trade (or quote) events in this candle.public double getOpen()
public void setOpen(double open)
open
- the first (open) price of this candle.public double getHigh()
public void setHigh(double high)
high
- the maximal (high) price of this candle.public double getLow()
public void setLow(double low)
low
- the minimal (low) price of this candle.public double getClose()
public void setClose(double close)
close
- the last (close) price of this candle.public long getVolume()
public void setVolume(long volume)
volume
- total volume in this candle.public double getVWAP()
public void setVWAP(double vwap)
vwap
- volume-weighted average price (VWAP) in this candle.public long getBidVolume()
public void setBidVolume(long bidVolume)
bidVolume
- bid volume in this candle.public long getAskVolume()
public void setAskVolume(long askVolume)
askVolume
- ask volume in this candle.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |