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;
size- size of the last trade as integer number (rounded toward zero);
sizeAsDouble- size of the last trade as floating number with fractions;
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;
tickDirection- tick direction of the last trade;
extendedTradingHours- whether the last trade was in extended trading hours.
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. So,
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
Trade event, but they do update
The volume and turnover are included into the
Trade record instead
Summary record, because both volume and turnover typically update with each trade.
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.
NaNin 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.
getDayTurnover, getDayVolume, getDayVolumeAsDouble, getExchangeCode, getPrice, getSequence, getSize, getSizeAsDouble, getTickDirection, getTime, getTimeNanoPart, getTimeNanos, getTimeSequence, isExtendedTradingHours, 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-2019 Devexperts LLC. All Rights Reserved.