Package com.jfcbuilder.types
Class DohlcvSeries
java.lang.Object
com.jfcbuilder.types.OhlcvSeries
com.jfcbuilder.types.DohlcvSeries
Class for aggregating and representing a stock market Date Open High Low Close Volume (DOHLCV)
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.DohlcvSeries
(long[] dateArr, double[] openArr, double[] highArr, double[] lowArr, double[] closeArr, double[] volumeArr) Constructor for initializing with specific value arrays. -
Method Summary
-
Constructor Details
-
DohlcvSeries
public DohlcvSeries()Constructor. Initializes all value arrays to an empty one. -
DohlcvSeries
public DohlcvSeries(long[] dateArr, 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:
dateArr
- Array of data values representing milliseconds since the epoch startopenArr
- 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
-
dates
public long[] dates()Gets the configured date values.- Returns:
- The array of date values.
-