Hi AxMari,
I've got two possible solutions to help you achieve your objective.
Firstly, you may consider using the SMA indicator. It's designed to compute the average from a specified number of points outlined in the `series.params.period`. You can check out how it works here:
https://jsfiddle.net/BlackLabel/x09zajvL/
Just a friendly heads up - this indicator series won't replace your original series. Instead, it calculates its values based on your main series values. So, for instance, if you're starting with a series like this:
[
[0, 1],
[1, 2],
[2, 2],
[3, 5],
[4, 5]
]
and you select period 4, the output would look something like this:
[
[3, 2.5],
[4, 3.5]
]
Alternatively, another solution is to make use of the dataGrouping option, as I pointed out earlier. We've got an API option, dataGrouping.approximation, that can help you sort out how your values are computed based on the points found in your grouped point. Here's where you can find it:
https://api.highcharts.com/highstock/se ... roximation
Much like the first option, this one also has its own set of rules: if the time periods between your points differ, the number of points per group can change.
Feel free to look deeper into the details in our API reference, and of course, if you have any more questions or need further clarification, I'm here to help!