0

I want to decode and read .bi5 file which is downloaded from the Dukascopy website.

I am aware of this question but unfortunately the suggested python code no longer produces valid output because the data file itself has been changed. This is the final output of .bi5 ohlc tick file (time,Open,High,Low,Close,Volume):

31.10.2018 00:00:00.000,1.13452,1.13452,1.13452,1.13452,3
31.10.2018 00:00:01.000,1.13450,1.13450,1.13450,1.13450,6.56
31.10.2018 00:00:02.000,1.13450,1.13450,1.13450,1.13450,3.44
31.10.2018 00:00:03.000,1.13450,1.13451,1.13449,1.13451,13.35
31.10.2018 00:00:04.000,1.13451,1.13451,1.13451,1.13451,1.31
31.10.2018 00:00:05.000,1.13451,1.13451,1.13451,1.13451,1.25
31.10.2018 00:00:06.000,1.13452,1.13452,1.13452,1.13452,1

The file is no longer in the 3i2f format. What would be the struct format of this file? I know that instead of 2f it now has 5 float values (5f) but what about the time?

Any help is really appreciated.

wiki
  • 1,285
  • 1
  • 18
  • 31

1 Answers1

0

I was looking for the same information to no avail so posting the answer here despite question being 8 months old.

Oddly the time and ohlc are integers, only volume is float.

Time is an offset from midnight in seconds.

In [118]:bi5_to_df('20100101.bi5', '>5if').head(5)
Out[118]:
     0       1       2       3       4          5
0    0  143283  143267  143267  143283  74.300003
1   60  143268  143284  143268  143285  25.400000
2  120  143280  143280  143268  143280  30.900000
3  180  143280  143273  143268  143280  41.900002
4  240  143283  143277  143277  143283  53.799999