patricoos
Posts: 2
Joined: Tue Jul 13, 2021 10:56 am

Custom technical indicators - Flags type

Hi,
I want to create custom indicator based on Flag series (angular). I create already some custom indicators, but only line type (sma parent, example below). I can not find any examples for not linear chart series type. Is it possible to create such indicators?

https://www.highcharts.com/docs/stock/c ... indicators
https://www.highcharts.com/docs/stock/flag-series

Code: Select all

const getSMMA = (xData: any[], yData: any[][], params: any) => {
   ...
  return {    xData: xResults,    yData: yResults,    values: yResults  };
}

Highcharts.seriesType(
  'smma',
  'sma', {
  name: 'smma',
  dataGrouping: { enabled: false },
  marker: { enabled: false, radius: 0 },
  params: {}
}, {
  getValues: function (series: any, params: any) {
    return this.getLinearRegression(series.xData, series.yData, params);
  },
  getLinearRegression: getSMMA
});
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Custom technical indicators - Flags type

Hi,
Thanks for your question.

Yes, you have the possibility to create non-linear indicator, please have a look at this articles:
https://www.highcharts.com/docs/stock/t ... tor-series
https://www.highcharts.com/blog/tutoria ... ndicators/

Let me know if was that were you looking for.
Best regards.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Stock”