Package com.strategyquant.datalib
Class TickEvent
java.lang.Object
com.strategyquant.datalib.TickEvent
Object holding data for one tick - ask & bid price, session times, symbol & connection hash, etc.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copyValues(TickEvent event)
Copy values.double
getAsk()
Gets the ask.double
getBid()
Gets the bid.int
Gets the connection hash.long
Gets the session end time.long
Gets the session start time.int
Gets the symbol hash.long
getTime()
Gets the time.double
Gets the volume.boolean
Checks if is bar close.boolean
Checks if is bar open.boolean
isSet()
Checks if is sets the.void
set(long time, int connectionHash, int symbolHash, double bid, double ask, double volume, long sessionStartTime, boolean barOpen, boolean barClose)
Sets the.void
set(long time, int connectionHash, int symbolHash, double bid, double ask, double volume, long sessionStartTime, long sessionEndTime, boolean barOpen, boolean barClose)
Sets the.void
Sets the.void
setAsk(double value)
Sets the ask.void
setBid(double value)
Sets the bid.void
setConnectionHash(int connectionHash)
Sets the connection hash.void
setIsSet(boolean isSet)
Sets the checks if is set.void
setSessionEndTime(long sessionEndTime)
Sets the session end time.void
setSessionStartTime(long sessionStartTime)
Sets the session start time.void
setSymbolHash(int symbolHash)
Sets the symbol hash.void
setTime(long time)
Sets the time.void
setVolume(double volume)
Sets the volume.toString()
-
Constructor Details
-
TickEvent
public TickEvent()
-
-
Method Details
-
isSet
public boolean isSet()Checks if is sets the.- Returns:
- true, if is sets the
-
setIsSet
public void setIsSet(boolean isSet)Sets the checks if is set.- Parameters:
isSet
- the new checks if is set
-
getSymbolHash
public final int getSymbolHash()Gets the symbol hash.- Returns:
- the symbol hash
-
setSymbolHash
public void setSymbolHash(int symbolHash)Sets the symbol hash.- Parameters:
symbolHash
- the new symbol hash
-
getSessionStartTime
public long getSessionStartTime()Gets the session start time.- Returns:
- the session start time
-
setSessionStartTime
public void setSessionStartTime(long sessionStartTime)Sets the session start time.- Parameters:
sessionStartTime
- the new session start time
-
getSessionEndTime
public long getSessionEndTime()Gets the session end time.- Returns:
- the session end time
-
setSessionEndTime
public void setSessionEndTime(long sessionEndTime)Sets the session end time.- Parameters:
sessionEndTime
- the new session end time
-
getConnectionHash
public final int getConnectionHash()Gets the connection hash.- Returns:
- the connection hash
-
setConnectionHash
public void setConnectionHash(int connectionHash)Sets the connection hash.- Parameters:
connectionHash
- the new connection hash
-
getAsk
public double getAsk()Gets the ask.- Returns:
- the ask
-
setAsk
public void setAsk(double value)Sets the ask.- Parameters:
value
- the new ask
-
getBid
public double getBid()Gets the bid.- Returns:
- the bid
-
setBid
public void setBid(double value)Sets the bid.- Parameters:
value
- the new bid
-
getVolume
public double getVolume()Gets the volume.- Returns:
- the volume
-
copyValues
Copy values.- Parameters:
event
- the event
-
getTime
public long getTime()Gets the time.- Returns:
- the time
-
setTime
public void setTime(long time)Sets the time.- Parameters:
time
- the new time
-
setVolume
public void setVolume(double volume)Sets the volume.- Parameters:
volume
- the new volume
-
set
public void set(long time, int connectionHash, int symbolHash, double bid, double ask, double volume, long sessionStartTime, long sessionEndTime, boolean barOpen, boolean barClose)Sets the.- Parameters:
time
- the timeconnectionHash
- the connection hashsymbolHash
- the symbol hashbid
- the bidask
- the askvolume
- the volumesessionStartTime
- the session start timesessionEndTime
- the session end timebarOpen
- the bar openbarClose
- the bar close
-
set
public void set(long time, int connectionHash, int symbolHash, double bid, double ask, double volume, long sessionStartTime, boolean barOpen, boolean barClose)Sets the.- Parameters:
time
- the timeconnectionHash
- the connection hashsymbolHash
- the symbol hashbid
- the bidask
- the askvolume
- the volumesessionStartTime
- the session start timebarOpen
- the bar openbarClose
- the bar close
-
set
Sets the.- Parameters:
simulatorEvent
- the simulator event
-
isBarOpen
public boolean isBarOpen()Checks if is bar open.- Returns:
- true, if is bar open
-
isBarClose
public boolean isBarClose()Checks if is bar close.- Returns:
- true, if is bar close
-
toString
-