riccardomerlo
Posts: 2
Joined: Thu Mar 24, 2022 2:51 pm

Additional series selector in custom indicator

Hello everybody,

I'm building a custom indicator whitch requires two different series as input parameters, I've got it working using the parameter "volumeSeriesID" but as far as I understand it is made specifically for a Volume data series and also in the indicator menu it appears with the "Volume" label.
I'm wondering if there is a more generic way to input another series, just like the one that comes by default.

P.S. if anybody knows where to find some documentation about this topic, because I've really been struggling finding any info at all!

Thank you very much!
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Additional series selector in custom indicator

Hi,

Welcome to our forum and thanks for contacting us with your question!

Yes, you can use chart.addSeries() method to add series.

API:
https://api.highcharts.com/class-refere ... #addSeries

You will find more information about adding custom indicators in the following links:

Docs:
https://www.highcharts.com/docs/stock/c ... indicators
https://www.highcharts.com/blog/tutoria ... al-charts/

Similar thread that might be helpful:
https://stackoverflow.com/questions/556 ... ies-as-inp

Feel free to ask any further questions,
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer
riccardomerlo
Posts: 2
Joined: Thu Mar 24, 2022 2:51 pm

Re: Additional series selector in custom indicator

Hi, I'm sorry maybe I expressed myself wrong. What I was actually asking is regarding this bit of code:

Code: Select all

{
            type: 'vbp',
            linkedTo: 'aapl',
            params: {
                volumeSeriesID: 'volume'
            }

That can be referenced to one of the guides you linked: https://www.highcharts.com/blog/tutoria ... al-charts/

My perplexities are about that param called "volumeSeriesID" which, in the indicator menu, generates a dropdown list of all the existing series. The problem is that "input" is labelled as volume data because of its nature, instead I'd prefer to have it labelled as series. Image

Thank you!
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Additional series selector in custom indicator

Hi,

Apologize for the misunderstanding. You can easly change it by the following code:

Code: Select all

Highcharts.setOptions({
  lang: {
    navigation: {
      popup: {
        volume: 'Series'
      }
    }
  }
});

Demo:
https://jsfiddle.net/BlackLabel/41pva6ks/

API:
https://api.highcharts.com/highstock/la ... tion.popup

Let me know if you have any further questions,
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer

Return to “Highcharts Stock”