Class OhlcvSeries

java.lang.Object
com.jfcbuilder.types.OhlcvSeries
Direct Known Subclasses:
DohlcvSeries

public class OhlcvSeries extends Object
Class for aggregating and representing a stock market Open High Low Close Volume (OHLCV) series. The values are stored in an individual primitive array for each component series. A record represents the value in each array at the same particular element. All array lengths must match otherwise logic errors could ensue.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
    OhlcvSeries(double[] openArr, double[] highArr, double[] lowArr, double[] closeArr, double[] volumeArr)
    Constructor for initializing with specific value arrays.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Gets the configured date values.
    double[]
    Gets the configured high values.
    double[]
    Gets the configured low values.
    double[]
    Gets the configured open values.
    double[]
    Gets the configured volume values.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OhlcvSeries

      public OhlcvSeries()
      Constructor. Initializes all value arrays to an empty one.
    • OhlcvSeries

      public OhlcvSeries(double[] openArr, double[] highArr, double[] lowArr, double[] closeArr, double[] volumeArr)
      Constructor for initializing with specific value arrays. All arrays should be of same length with date values corresponding to values in other arrays at the same element index.
      Parameters:
      openArr - Array of price open values
      highArr - Array of price high values
      lowArr - Array of price low values
      closeArr - Array of price close values
      volumeArr - Array of volume values
  • Method Details

    • opens

      public double[] opens()
      Gets the configured open values.
      Returns:
      The array of open values.
    • highs

      public double[] highs()
      Gets the configured high values.
      Returns:
      The array of high values.
    • lows

      public double[] lows()
      Gets the configured low values.
      Returns:
      The array of low values.
    • closes

      public double[] closes()
      Gets the configured date values.
      Returns:
      The array of date values.
    • volumes

      public double[] volumes()
      Gets the configured volume values.
      Returns:
      The array of volume values.