public class Trade extends TradeBase
Tradeevent has the following properties:
eventSymbol- symbol of this event;
time- time of the last trade;
timeNanoPart- microseconds and nanoseconds time part of the last trade;
sequence- sequence of the last trade;
exchangeCode- exchange code of the last trade;
price- price of the last trade;
change- change of the last trade;
size- size of the last trade as integer number (rounded toward zero);
sizeAsDouble- size of the last trade as floating number with fractions;
tickDirection- tick direction of the last trade;
extendedTradingHours- whether the last trade was in extended trading hours;
dayId- identifier of the current trading day;
dayVolume- total volume traded for a day as integer number (rounded toward zero);
dayVolumeAsDouble- total volume traded for a day as floating number with fractions;
dayTurnover- total turnover traded for a day;
Tradeevent defines last trade
priceas officially defined by the corresponding exchange for its regular trading hours (RTH). It also include an official exchange
dayTurnoverfor the whole trading day identified by
Tradeevent captures all the official numbers that are typically reported by exchange.
Trades that happen in extended trading hours (ETH, pre-market and post-market trading sessions),
which are typically defined for stocks and ETFs, do not update last trade
tickDirection in the
event, but they do update
The volume and turnover are included into the
Trade event instead
Summary event, because both volume and turnover typically update with each trade.
dayId field identifies current trading day for which volume and turnover statistics are computed.
This solution avoids generation of multiple events on each trade during regular trading hours.
Summary event is generated during the trading day only when new highs
or lows are reached or other properties change.
dayIdto the next trading day in preparation to the next day's pre-market trading session (or for regular trading if there is no pre-market) while leaving all other properties intact. They reflect information about the last known RTH trade until the next RTH trade happens.
Trade&Xfor regional exchange trades. Regional records do not explicitly store a field for
|Constructor and Description|
Creates new trade with default values.
Creates new trade with the specified event symbol.
|Modifier and Type||Method and Description|
Returns string representation of this trade event.
getChange, getDayId, getDayTurnover, getDayVolume, getDayVolumeAsDouble, getExchangeCode, getPrice, getSequence, getSize, getSizeAsDouble, getTickDirection, getTime, getTimeNanoPart, getTimeNanos, getTimeSequence, isExtendedTradingHours, setChange, setDayId, setDayTurnover, setDayVolume, setDayVolumeAsDouble, setExchangeCode, setExtendedTradingHours, setPrice, setSequence, setSize, setSizeAsDouble, setTickDirection, setTime, setTimeNanoPart, setTimeNanos, setTimeSequence
getEventSymbol, getEventTime, setEventSymbol, setEventTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Trade(String eventSymbol)
eventSymbol- event symbol.
Copyright © 2002-2020 Devexperts LLC. All Rights Reserved.