FX31337 / FX-BT-Scripts

:page_facing_up: Useful scripts for backtesting.
MIT License
34 stars 39 forks source link

Python script to read HCC files #77

Closed kenorb closed 7 years ago

kenorb commented 7 years ago

Extend read_mt_formats.py and convert_mt_to_csv.py scripts (both) to read HCC files containing historical data (similar as it does for other formats).

The structure of this format is explained here (note: this info could be a bit out of date).

Then after running the script (read_mt_formats.py) I expect that all values are printed into the screen into meaningful formats, for example:

2015-01-02 10:00:00 1.205450 1.205450 1.205140 1.205160    31     9 22000000 
2015-01-02 10:01:00 1.205160 1.205210 1.205030 1.205030    31     6 35000000 
2015-01-02 10:02:00 1.205030 1.205030 1.204680 1.204730    51     9 54500000 
2015-01-02 10:03:00 1.204730 1.204750 1.203460 1.203850    81    18 65700000 

There should be two type of formats to print for read_mt_formats.py script, one for the header, another for data it-self.

Then the convert_mt_to_csv.py should print only data into CSV format, in the same format as it is for the existing HST or FXT format (the one which is most suitable for it).

For unknown fields, you can add the placeholders (e.g. unknown1, unknown2).

See also: CSVtoHCC repo.

Please find the sample files in the attachment.

EURUSD.zip

Ref: codemill$160