FX31337 / FX-BT-Scripts

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

convert_csv_to_mt.py: Wrong Ask&Bid price in FXT file. #29

Closed kenorb closed 8 years ago

kenorb commented 8 years ago

It seems open/low/high/close values are incorrect for FXT files (see header info) as below:

$ convert_mt_to_csv.py -i EURUSD1_0.fxt -f fxt4 -v
[INFO] Trying to read data from EURUSD1_0.fxt...
2014-01-01 22:00:00    1.37553    1.37553    1.37553    1.37553          1  2014-01-01 22:00:58  4
2014-01-01 22:00:00    1.37553    1.37553    1.37552    1.37552          1  2014-01-01 22:00:59  4

which should match with CSV file and the logic should be similar as in CSV2FXT.mq4, so Ask&Bid prices can be different for each tick.

kenorb commented 8 years ago

Implemented setting spread in FXT files per each test, but I don't think it fixes the problem completely, so it needs more investigation how we can fix it.

kenorb commented 8 years ago

This works when FXT files aren't read-only, then the spread works correctly.