Class BarContext


  • public class BarContext
    extends Object
    BarContext represents a transient state of the bar being built. Please note, that the computations are done in doubles.
    • Constructor Detail

      • BarContext

        public BarContext​(Duration newDuration,
                          ZonedDateTime newStartTime,
                          Number newLow,
                          Number newHigh,
                          Number newOpen,
                          Number newClose,
                          Number newVolume)
        Bar context. The bar is constructed after the time has finished.
        Parameters:
        newDuration - the duration
        newStartTime - start time of the bar
        newLow - low price
        newHigh - high price
        newOpen - open price
        newClose - close price
        newVolume - volume
    • Method Detail

      • isAfter

        public final boolean isAfter​(ZonedDateTime timestamp)
      • getDuration

        public Duration getDuration()
        The duration.
      • getStartTime

        public ZonedDateTime getStartTime()
        The start time.
      • getLow

        public double getLow()
        Low price.
      • getHigh

        public double getHigh()
        High price.
      • getOpen

        public double getOpen()
        Open price.
      • getClose

        public double getClose()
        Close price.
      • getVolume

        public double getVolume()
        Volume.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object