1 registered members (AndrewAMD),
177
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Problems with importing daily EOD data from csv to history
#466881
07/05/17 18:06
07/05/17 18:06
|
Joined: Jul 2017
Posts: 7
mltradefx
OP
Newbie
|
OP
Newbie
Joined: Jul 2017
Posts: 7
|
Hi, I have been fighting the following problem now for days and am desperate:
I would like to use my own data downloaded from different sites and stored as CSV files. Unfortunately I am lost trying to figure out how to store them in a way to use them in Zorro.
I have been trying to figure out what I am doing wrong when using the CSVtoHistory.c script to import EOD and Daily Open High Low Close-Prices.
I made sure to adjust the string format of the script to my csv file (in the case of Close, Open, High, Low):
string Format = "%d.%m.%Y,f4,f3,f1,f2";
and ran the script CSVtoHistory.c. I then went on using the newly created data in Zorro. It seemed my t6 data files were off. When checking for possible errors by converting the t6 file back to csv using the CSVfromHistory.c script, for some reason in the csv-file every second and third line is messed up, while every third line seems correct, but missing lines inbetween, e.g:
1899/12/30 10:19:12,0.00000,1.71500,1.76200,7.15462 2017/06/14 00:00:00,1.78100,1.78300,1.67300,1.71700 1899/12/30 14:52:48,1.79500,0.00000,7.15459,1.77300 1899/12/30 13:32:10,0.00000,1.76600,1.77500,7.15457 2017/06/09 00:00:00,1.73500,1.79100,1.72700,1.76600 1899/12/30 11:31:12,1.78000,0.00000,7.15451,1.74200 1899/12/30 09:12:58,0.00000,1.73800,1.71200,7.15450 2017/06/05 00:00:00,1.72000,1.74700,1.71400,1.74300 1899/12/30 10:33:36,1.72000,0.00000,7.15445,1.71400 1899/12/30 12:40:19,0.00000,1.76200,1.76300,7.15442 2017/05/31 00:00:00,1.76800,1.78000,1.74700,1.75300
I simply don't know where to go from here, I tried opening and correcting my csv files in every editor I know and have available in case my formatting is off. I unfortunately also don't see any errors in the CSVtoHistory.c or CSVfromHistory.c scripts. When parsing the data via dataParse from the csv file and outputting dataVar() via printf the data seems to be correct. But once stored as t6 and reading it from there, the data is completely messed up and not usable.
I appreciate all your help in giving me hints where to go from here. Thanks.
|
|
|
Re: Problems with importing daily EOD data from csv to history
[Re: jcl]
#466924
07/08/17 13:46
07/08/17 13:46
|
Joined: Jul 2017
Posts: 7
mltradefx
OP
Newbie
|
OP
Newbie
Joined: Jul 2017
Posts: 7
|
Hi jcl, thanks again for your help. But there seem to be more problems with this than was apparent at first. For some reason the data is still messed up in a very irregular way. Below is a copy/paste of the zHistoryEditor showing a selection of lines from my t6-file. Out of this selection I market all lines yellow that show an incorrect opening price, which instead is the same as the closing price. For the same lines also the Low Price is wrong being the same as the High. The pattern and number of yellow marked, i.e. incorrect, lines seems completely random to say that it is somehow only weekends or other specific days that are messed up. I am completely stuck. I don't know where else to look for a mistake. It just doesn't look like a logical mistake. The csv-file is correct. I double and triple-checked it for the same lines that are messed up in t6 (Decimal separator is a comma here, since I am from Germany, values separated by space):
Time Open High Low Close Vol Spread
2010.01.04 00:00 0,121847078 0,121847078 0,122145414 0,122145414 0 0 2010.01.05 00:00 0,122145414 0,122145414 0,123722121 0,123722121 0 0 2010.01.06 00:00 0,123722121 0,123722121 0,12501125 0,12501125 0 0 2010.01.07 00:00 0,12501125 0,12501125 0,126735985 0,126735985 0 0 2010.01.08 00:00 0,126735985 0,126735985 0,127231076 0,127231076 0 0 2010.01.11 00:00 0,126694039 0,127231076 0,127231076 0,126694039 0 0 2010.01.12 00:00 0,125529274 0,126694039 0,126694039 0,125529274 0 0 2010.01.13 00:00 0,124676749 0,125529274 0,125529274 0,124676749 0 0 2010.01.14 00:00 0,124676749 0,124676749 0,124754429 0,124754429 0 0 2010.01.15 00:00 0,124754429 0,124754429 0,125364587 0,125364587 0 0 2010.01.18 00:00 0,124110736 0,125364587 0,125364587 0,124110736 0 0 2010.01.19 00:00 0,122703828 0,124110736 0,124110736 0,122703828 0 0 2010.01.20 00:00 0,120488331 0,122703828 0,122703828 0,120488331 0 0 2010.01.21 00:00 0,118012756 0,120488331 0,120488331 0,118012756 0 0 2010.01.22 00:00 0,118012756 0,118012756 0,118633315 0,118633315 0 0 2010.01.25 00:00 0,118633315 0,118633315 0,119293787 0,119293787 0 0 2010.01.26 00:00 0,119293787 0,119293787 0,119983405 0,119983405 0 0 2010.01.27 00:00 0,119983405 0,119983405 0,121241517 0,121241517 0 0 2010.01.28 00:00 0,119147956 0,121241517 0,121241517 0,119147956 0 0 2010.01.29 00:00 0,119147956 0,119147956 0,120793946 0,120793946 0 0 2010.02.01 00:00 0,12006779 0,120793946 0,120793946 0,12006779 0 0 2010.02.02 00:00 0,12006779 0,12006779 0,12152449 0,12152449 0 0 2010.02.03 00:00 0,120967992 0,12152449 0,12152449 0,120967992 0 0 2010.02.04 00:00 0,12056575 0,120967992 0,120967992 0,12056575 0 0 2010.02.05 00:00 0,119980909 0,12056575 0,12056575 0,119980909 0 0 2010.02.08 00:00 0,118730642 0,119980909 0,119980909 0,118730642 0 0
|
|
|
|