Hi, i wiil try to create indicator from csv file. Data from the csv has the following format:
timestamp,open,high,low,close,volume,volume_buy,count
2017-01-01 01:00:00,968.49,968.76,964.54,968.0,384541.0,189386.0,132.0
2017-01-01 02:00:00,968.09,968.1,963.4,963.4,355937.0,125474.0,122.0
I tried to use the option FillSeriesFromFile to convert this data to DataSeries Wealth Lab, but keep getting the error " Runtime error: Input string was not in a correct format". Perhaps I incorrectly specified the DateTime ToString format? Help to understand, thank you
CODE:
Please log in to see this code.
Size:
Color:
Hi,
I think the routine should have better success importing the data if you get rid of the header and space between the lines:
1. Header:
QUOTE:
timestamp,open,high,low,close,volume,volume_buy,count
2. Space between lines:
QUOTE:
2017-01-01 01:00:00,968.49,968.76,964.54,968.0,384541.0,189386.0,132.0
2017-01-01 02:00:00,968.09,968.1,963.4,963.4,355937.0,125474.0,122.0
Not just one but both.
Size:
Color:
Eugene, Thank you for your response.
I did everything You recommended. Removed the spaces between the lines and the header, but still get the error Runtime in A CORRECT FORMAT. Do you run this code with my data? Does it matter which data I want to run it on?
The data now looks like this:
2017-01-01 01:00:00,968.49,968.76,964.54,968.0,384541.0,189386.0,132.0
2017-01-01 02:00:00,968.09,968.1,963.4,963.4,355937.0,125474.0,122.0
2017-01-01 03:00:00,964.6,964.6,963.16,964.26,160422.0,57370.0,43.0
Size:
Color:
Size:
Color:
Ok, thank you for paying attention to the string format
I fixed this error in this line, but at start still indicates the same problem about string format.
Does the number of values in the file matter?
What else can I do wrong? I attached a file that I'm trying to parse
Size:
Color:
Not sure what's wrong because I can see the chart correctly rendered with your sample data as expected. Note, however, that FillSeriesFromFile is suboptimal for your data which includes OHLC. An easier solution would be to use the ASCII data provider and define the last 2 columns ("volume_buy,count") as Named DataSeries.
For more details please refer to the QuickRef > Bars object > FindNamedSeries, HasNamedDataSeries and NamedSeries .
Size:
Color:
Ok, I thanks, I'll try to do it
Size:
Color:
Last but not least. It's called Custom Field in the ASCII provider. Please find more info in the User Guide > Data > Data Manager > Create New DataSet > Data Providers > ASCII.
Size:
Color:
Eugene, thanks! It's job
Size:
Color:
Glad I could assist.
Size:
Color: