FX31337 / FX-BT-Scripts

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

Prices of XAUUSD/XAGUSD are not correct #97

Closed kenorb closed 5 years ago

kenorb commented 5 years ago

Reproduction steps:

  1. Run: ./dl_bt_dukascopy.py -p XAUUSD -y 2013 -m 3 -d 1 -c
  2. Run: head download/dukascopy/XAUUSD/2013/03/2013-03-01--01h_ticks.csv.

Result:

2013.03.01 01:00:00.060,15.82063,15.82364,0.00,0.00
2013.03.01 01:00:00.403,15.82033,15.82333,0.00,0.00
2013.03.01 01:00:00.464,15.81909,15.82272,0.00,0.00
2013.03.01 01:00:00.733,15.81963,15.82263,0.00,0.00
2013.03.01 01:00:00.793,15.81852,15.82192,0.00,0.00
2013.03.01 01:00:00.863,15.81803,15.82166,0.00,0.00
2013.03.01 01:00:00.933,15.81873,15.82174,0.00,0.00
2013.03.01 01:00:01.120,15.8168,15.82043,0.00,0.00
2013.03.01 01:00:01.194,15.81733,15.82043,0.00,0.00
2013.03.01 01:00:01.313,15.81652,15.81988,0.00,0.00

Correct prices should be like:

Local time,Ask,Bid,AskVolume,BidVolume
01.03.2013 00:00:00.605 GMT-0000,1581.15,1580.7870000000003,400,700
01.03.2013 00:00:00.665 GMT-0000,1581.171,1580.808,400,700
01.03.2013 00:00:00.786 GMT-0000,1581.253,1580.953,300,200
01.03.2013 00:00:01.407 GMT-0000,1581.1329999999998,1580.77,400,200
01.03.2013 00:00:01.476 GMT-0000,1581.213,1580.913,300,200

image

Please check the XAUUSD CSV file at https://www.dukascopy.com/plugins/fxMarketWatch/?historical_data such as: XAUUSD_Ticks_01.03.2013-01.03.2013.csv.gz

Please check similar go-duka tool for example, which I think converts the data correctly.

The issue should be solved for XAUUSD, XAGUSD and USDRUB.

kenorb commented 5 years ago

Fixed in GH-99.