Class AnalysisWorker
java.lang.Object
com.arbergashi.charts.internal.AnalysisWorker
Internal worker for performing analytical calculations on primitive arrays.
This class is designed to be allocation-free in its core methods.
- Since:
- 2025-01-01
- Version:
- 1.0.0
- Author:
- Arber Gashi
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcalculateBollingerBands(double[] values, int period, double stdDevFactor, double[] smaOut, double[] upperOut, double[] lowerOut) Calculates Bollinger Bands from an array of price data.
-
Method Details
-
calculateBollingerBands
public static void calculateBollingerBands(double[] values, int period, double stdDevFactor, double[] smaOut, double[] upperOut, double[] lowerOut) Calculates Bollinger Bands from an array of price data.- Parameters:
values- The input price data (e.g., close prices).period- The moving average period (e.g., 20).stdDevFactor- The number of standard deviations for the bands (e.g., 2.0).smaOut- Output array for the Simple Moving Average.upperOut- Output array for the upper band.lowerOut- Output array for the lower band.
-