Class TickEvent

java.lang.Object
com.strategyquant.datalib.TickEvent

public class TickEvent extends Object
Object holding data for one tick - ask & bid price, session times, symbol & connection hash, etc.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Copy values.
    double
    Gets the ask.
    double
    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
    Gets the time.
    double
    Gets the volume.
    boolean
    Checks if is bar close.
    boolean
    Checks if is bar open.
    boolean
    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
    set​(TickEvent simulatorEvent)
    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.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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

      public void copyValues(TickEvent event)
      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 time
      connectionHash - the connection hash
      symbolHash - the symbol hash
      bid - the bid
      ask - the ask
      volume - the volume
      sessionStartTime - the session start time
      sessionEndTime - the session end time
      barOpen - the bar open
      barClose - 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 time
      connectionHash - the connection hash
      symbolHash - the symbol hash
      bid - the bid
      ask - the ask
      volume - the volume
      sessionStartTime - the session start time
      barOpen - the bar open
      barClose - the bar close
    • set

      public void set(TickEvent simulatorEvent)
      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

      public String toString()
      Overrides:
      toString in class Object