CSVToHistory.c

Posted By: Paul_der_Zweite

CSVToHistory.c - 09/25/18 16:32

The download of the Broker history doesn't work correctly with the download script. I now download the history in Metatrader 5 as a csv file from the broker (min. 20 years available) and convert (and arrange) it into t6 files using CSVtoHistory.c.

How can I address MORE than 6 columns of the csv file in the script (f1 - f6)?
f7 and above is not accepted.

Thanks in advance.
Posted By: Dalla

Re: CSVToHistory.c - 09/25/18 18:42

As you said yourself, the script is for converting data into t6 files.
A t6 struct only contains 6 fields plus a date, so by definition you cannot add any more than six fields. You you want a dataset that holds other custom data, look at the data functions here http://zorro-project.com/manual/en/data.htm
Posted By: Paul_der_Zweite

Re: CSVToHistory.c - 09/26/18 08:43

Okay, my mistake.

My source file has 9 columns. The target file has 6 columns excluding Date. I had forgotten a tab to filter out columns of the source file (in this case <VOL>).

Code:
//<DATE> <TIME> <OPEN> <HIGH> <LOW> <CLOSE> <TICKVOL> <VOL> <SPREAD>
// STK line format "2018.01.01 23:00:00 1.20098 1.20103 1.20086 1.20086 12 0 21"
string Format = "%Y.%m.%d %H:%M:%S f3 f1 f2 f4 f6  < 2Tabs > f5";

© 2024 lite-C Forums