fileappend exports integer only

Questions about MultiCharts and user contributed studies.
waveslider
Posts: 223
Joined: 16 Oct 2011
Has thanked: 66 times
Been thanked: 20 times

fileappend exports integer only

Postby waveslider » 31 Dec 2021

Hello -
I am exporting from an indicator to csv using fileappend.
For example I export numtostr(value1,4), however the numbers after the decimal are not found in the CSV file (only integer). The number is apparently rounded to the nearest whole number.
Anyone else experience this?
When I stick a print statement in the code the value is outputted correctly.
Thanks!

User avatar
Tammy MultiCharts
Posts: 200
Joined: 06 Aug 2020
Has thanked: 6 times
Been thanked: 65 times

Re: fileappend exports integer only

Postby Tammy MultiCharts » 20 Jan 2022

Hello waveslider,

We couldn't reproduce the behavior you described on our end.
Please try to open the exported file in Notepad and check if the numbers after the decimal are there.

If you are opening the file in Excel, please make sure the delimiters are specified correctly.
For example, the following sample works as expected:

Code: Select all

FileAppend("c:\tmp\test.csv", datetostring(datetime)+"," + numtostr(value1,4)+NewLine);


Return to “MultiCharts”