faspial
Posts: 5
Joined: Mon Aug 30, 2021 9:13 am

The number of decimal places exceeds the data value and the series is not selected when using the technical indicator.

Hi! I'm an economist. Not a programmer. My knowledge is not enough. Help me complete it. I have 2 problems.
1. I can't select a series when using a technical indicator. Using the experience of support, I can't implement it.
2. The database contains values with two decimal places 0.00. However, additional 0.00000000 characters appear in the tooltip.
I attach the code.
Attachments
indexStruktura jquery86.7z
Code
(1.39 KiB) Downloaded 42 times
Problem 2
Problem 2
Дроби.png (121.44 KiB) Viewed 963 times
Problem 1
Problem 1
Series.png (89.95 KiB) Viewed 963 times
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: The number of decimal places exceeds the data value and the series is not selected when using the technical indicato

Hello faspial,

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

I'll start with excessive decimal places. There's an API option tooltip.valueDecimals that allows you to specify how many decimals to show. It should be perfect in your case.
API reference: https://api.highcharts.com/highstock/to ... ueDecimals

When it comes to missing series for SMA, it is hard to tell what is not working without looking at you code. It would be great if you could try to reproduce that issue in a form of a live demo. You could start here: https://jsfiddle.net/BlackLabel/6q07mjv5/

Here you can find working demo, perhaps comparing it with your code could give you an idea what's wrong: https://jsfiddle.net/BlackLabel/ztyvefp8/

Let me know if that was what you were looking for!
Best regards!
Mateusz Bernacik
Highcharts Developer
faspial
Posts: 5
Joined: Mon Aug 30, 2021 9:13 am

Re: The number of decimal places exceeds the data value and the series is not selected when using the technical indicato

O! Thanks to you, I have solved the problem with the number of decimal places.
However, I still count on help with working with the technical indicator.
https://jsfiddle.net/faspial/5jwmv0g3/3/
faspial
Posts: 5
Joined: Mon Aug 30, 2021 9:13 am

Re: The number of decimal places exceeds the data value and the series is not selected when using the technical indicato

I solved the problem with the selection of the series when setting the indicator.
But a new problem.
On the Series 1 (Portfolio), the indicator works completely and to the end. Series 2,3 (Vklad, Profit) indicators do not work completely and are interrupted.

https://jsfiddle.net/faspial/5jwmv0g3/22/
Attachments
new problem
new problem
New problem.jpg (238.16 KiB) Viewed 926 times
Add code
Add code
Add code.jpg (253.17 KiB) Viewed 926 times
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: The number of decimal places exceeds the data value and the series is not selected when using the technical indicato

Hello faspial,

The issue is caused most likely by invalid values in your data. I found few occurances of "?" instead of null or numeric value.
invalid_data.png
invalid_data.png (11.08 KiB) Viewed 905 times

Just one more thing that I have noticed - you don't need to pass data for each series, you do it already in data.csv.
Demo: https://jsfiddle.net/BlackLabel/a1y9vpjg/


Please try to filter out any unsupported type of data and let me know if it works for you.

Best regards!
Mateusz Bernacik
Highcharts Developer
faspial
Posts: 5
Joined: Mon Aug 30, 2021 9:13 am

Re: The number of decimal places exceeds the data value and the series is not selected when using the technical indicato

Thank you very much! You have solved all my questions! I happy!
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: The number of decimal places exceeds the data value and the series is not selected when using the technical indicato

You're welcome! In case of any further questions, feel free to contact us again.
Mateusz Bernacik
Highcharts Developer
faspial
Posts: 5
Joined: Mon Aug 30, 2021 9:13 am

Re: The number of decimal places exceeds the data value and the series is not selected when using the technical indicato

*Just one more thing that I have noticed - you don't need to pass data for each series, you do it already in data.csv.*

That's what led me astray. After loading the CSV, the series appeared on the chart and legend, but I couldn't select them when the indicator was applied. Added separately - everything worked out.
Attachments
super
super
super.png (202.52 KiB) Viewed 896 times
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: The number of decimal places exceeds the data value and the series is not selected when using the technical indicato

faspial,

In that sentence I was refering to series.line.data option. You don't need to pass data for each line series, because you do it already in data.csv.

You couldn't select series for SMA indicator most likely because of missing series.line.id.
Demo: https://jsfiddle.net/BlackLabel/m18nkw0x/

Anyway, I'm glad we could work it out and everything works as intended.

Best regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”