vipuldev
Posts: 1
Joined: Thu Sep 08, 2022 11:56 am

Oscillator Series partially linked to chart

Hi Team ,
i am using version 8.2.2 , this is my config for oscillator series :

***
if (currentOscillator.id !== 0) {
series.push({
id: currentOscillator.value,
linkedTo: 'other-dataseries' + chartType,
name: currentOscillator.name,
type: currentOscillator.value,
yAxis: 2,
params: {
volumeSeriesID: 'other-dataseries'+ chartType
}
})
}
***
however , the oscillator series is not mapped end to end it missed few point from the left
Please refer to the image the bottom one is the oscillator series ,
https://drive.google.com/file/d/1uzTXSl ... sp=sharing

Thanks in advance
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Oscillator Series partially linked to chart

Hello,

Welcome to our forum and thank you for contacting us!

Correct me if I'm wrong, but just by looking at the screenshot that you have attached, I guess that the left side of the candlestick data is the beginning of the data that you have provided to the chart (meaning the chart is scrolled to the beginning).

If that's true, then everything is working correctly, because that's how the MACD indicator works.

The core functionality of the MACD is based on two exponential moving averages (by default with values of 12 and 26), and a difference between them (shown by those little orange columns). So mathematically it is not possible to show a moving average right at the beginning of the data because it needs some candles' closing price (i.e 12 and 26 in that case) to properly calculate an average of the last 12/26 candles.

That's why the moving average starts a bit later than the data.

Let me know if that was the case in your project, and if you have any other questions, do not hesitate to ask.
Best regards!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Stock”