@Description(value="Trade event is a snapshot of the price and size of the last trade during regular trading hours and an overall day volume.") public class Trade extends TradeBase
Trade
event has the following properties:
eventSymbol
- symbol of this event;
time
- time of the last trade;
exchangeCode
- exchange code of the last trade;
price
- price of the last trade;
size
- size of the last trade;
dayVolume
- total volume traded for a day.
Trade
event defines last trade Price
as officially defined
by the corresponding exchange for its regular trading hours (RTH).
It also include an official exchange DayVolume
for the whole trading day. So, Trade
event 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 Time
,
ExchangeCode
, Price
, and Size
in the Trade
event, but they do update DayVolume
.
During ETH a TradeETH
event is generated on each trade with its
ETH
property set to true
.
The volume is included into the Trade
record instead
of Summary
record, because the volume updates 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.
Trade
DayVolume
to zero 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
and Trade&X
for regional exchange trades.
Regional records do not explicitly store a field for ExchangeCode
property.Constructor and Description |
---|
Trade()
Creates new trade with default values.
|
Trade(String eventSymbol)
Creates new trade with the specified event symbol.
|
Modifier and Type | Method and Description |
---|---|
String |
toString()
Returns string representation of this trade event.
|
getDayVolume, getExchangeCode, getPrice, getSize, getTime, setDayVolume, setExchangeCode, setPrice, setSize, setTime
getEventSymbol, setEventSymbol
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEventSymbol, setEventSymbol
public Trade()
public Trade(String eventSymbol)
eventSymbol
- event symbol.Copyright © 2015 Devexperts. All Rights Reserved.