giuse88 / duka

duka - Dukascopy historical data downloader
http://giuse88.github.io/duka
MIT License
302 stars 135 forks source link

Some instruments have wrong point scales #23

Closed evianzhow closed 6 years ago

evianzhow commented 7 years ago

When I try to download the XAUUSD data, the result came like below:

2017-02-01 00:00:00.108000,12.11841,12.11539,370,370
......

Actually the bid price is 1211.841 instead of 12.11841.

I've done a little research about this, and I figured out that the point scale used by Dukascopy varies from instruments to instruments. Usually XAUUSD should be multiplied by 0.001.

Here comes the wrong one: https://github.com/giuse88/duka/blob/master/duka/core/processor.py#L64 And another correct example is here: https://github.com/FX31337/FX-BT-Scripts/blob/master/convert_bi5_to_csv.php#L104

I'll try to fix this issue as long as I've got spare time, but don't expect too much! :)

evianzhow commented 7 years ago

Also there is one important notice in this repo's README.

The ask and bid prices need to be multiplied by the point value for the symbol/currency pair.

evianzhow commented 6 years ago

Fixed in https://github.com/giuse88/duka/pull/24