tingo5
Posts: 8
Joined: Fri Nov 05, 2021 9:53 pm

How to set color of single point or annotation on Technical Indicator?

For example if you have an RSI, how can I color or mark when the value is less than 10?

Code: Select all

series: [{
type: 'candlestick',
id: 'Price',
data: data,
},
{
type: 'rsi',
name: 'RSI',
yAxis: 1,
linkedTo: 'Price',
params: {
period: 2
}
}],
jakub.s
Posts: 1075
Joined: Fri Dec 16, 2022 11:45 am

Re: How to set color of single point or annotation on Technical Indicator?

Hi,

Thanks for the question!

If you want to add a color to a specific range of values in your series you can use the series.zones option.

API: https://api.highcharts.com/highcharts/series.line.zones

Demo: https://jsfiddle.net/BlackLabel/pabyhkL7/

Adding a zone with a value of 10 to your RSI indicator should allow you to achieve what you described.

Please check this out and let me know if that works and if everything's clear.

Kind regards!
Jakub
Highcharts Developer

Return to “Highcharts Stock”