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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyValues(TickEvent event)Copy values.doublegetAsk()Gets the ask.doublegetBid()Gets the bid.intGets the connection hash.longGets the session end time.longGets the session start time.intGets the symbol hash.longgetTime()Gets the time.doubleGets the volume.booleanChecks if is bar close.booleanChecks if is bar open.booleanisSet()Checks if is sets the.voidset(long time, int connectionHash, int symbolHash, double bid, double ask, double volume, long sessionStartTime, boolean barOpen, boolean barClose)Sets the.voidset(long time, int connectionHash, int symbolHash, double bid, double ask, double volume, long sessionStartTime, long sessionEndTime, boolean barOpen, boolean barClose)Sets the.voidSets the.voidsetAsk(double value)Sets the ask.voidsetBid(double value)Sets the bid.voidsetConnectionHash(int connectionHash)Sets the connection hash.voidsetIsSet(boolean isSet)Sets the checks if is set.voidsetSessionEndTime(long sessionEndTime)Sets the session end time.voidsetSessionStartTime(long sessionStartTime)Sets the session start time.voidsetSymbolHash(int symbolHash)Sets the symbol hash.voidsetTime(long time)Sets the time.voidsetVolume(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
-