Package com.jfcbuilder.types
Class OhlcvSeries
java.lang.Object
com.jfcbuilder.types.OhlcvSeries
- Direct Known Subclasses:
DohlcvSeries
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
ConstructorsConstructorDescriptionConstructor.OhlcvSeries
(double[] openArr, double[] highArr, double[] lowArr, double[] closeArr, double[] volumeArr) Constructor for initializing with specific value arrays. -
Method Summary
-
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 valueshighArr
- Array of price high valueslowArr
- Array of price low valuescloseArr
- Array of price close valuesvolumeArr
- 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.
-