Comments (3)
@Leo4815162342 Thank you so much for looking into this! 🙇
The setting --time-zone
which you have added I believe will change the candle time representation into a different timezone. However Day Start Time
in dukas is not just changing the timezone representation of candle, but instead a setting to change from what time candles start forming in the day, specifically in the 4H candle in which I'm looking for, from 0:00UTC or from 2:00UTC. Essentially it is forming the 4H candles now as all the action from 2:00UTC-6:00UTC instead of from 0:00UTC-4:00UTC, and so on. You can read up more on what it means here under the section Day Start Time
.
For example, if I run the command:
npx dukascopy-node -i eurusd -from 2024-02-26 -to 2024-02-27 --time-zone UTC -t h4 -v true -fl true -f csv -r 1 --date-format "YYYY-MM-DD HH:mm:ss"
it outputs:
timestamp,open,high,low,close,volume
...
2024-02-26 16:00:00,1.08509,1.08555,1.08397,1.08462,27007.27
2024-02-26 20:00:00,1.08462,1.08525,1.08461,1.08503,19380.15
When you check the same candle data on the dukas online chart with Day start time
setting set to GMT (UTC 0), and timezone set to UTC, as below in the image:
![Screenshot 2024-02-28 at 5 15 30 PM](https://private-user-images.githubusercontent.com/157999680/308730874-0c4a388d-f9e9-47a4-b4b0-6683b9cf51cb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDk0MTI0ODYsIm5iZiI6MTcwOTQxMjE4NiwicGF0aCI6Ii8xNTc5OTk2ODAvMzA4NzMwODc0LTBjNGEzODhkLWY5ZTktNDdhNC1iNGIwLTY2ODNiOWNmNTFjYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwMzAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDMwMlQyMDQzMDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kOWEzNTIxNTA0Yjk0ZDc5ZmMyYTU3ODA4MmNlNGQ2Mjk4OGM5MDA1MGZkZjM0MDRlMmZjMjA0MGE1YmM5OTY5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.6aFJuesfheMtfBU61W4Qba7zInnpqwddh4tJUn4WNdk)
We can see that the OHLC of these candles are the same as outputted by dukascopy-node
. (for example the 2024-02-26 20:00:00 OHLC are the same)
However, if I change the Day start time
setting to EET (UTC + 2) in the chart (which is the version I want), with the candles still in timezone UTC, then we see the candles do not match anymore.
(below is the OHLC when I hover over 2024-02-26 22:00:00 candle)
Downloading the data instead in timezone Europe/Kiev
with dukascopy-node as well does not give the matching candles I am looking for. As shown below, we see the OHLC of 2024-02-26 22:00:00 does also not match the chart with Day start time
setting to EET (UTC + 2). It only changes the timezone and not the OHLC values.
npx dukascopy-node -i eurusd -from 2024-02-26 -to 2024-02-27 --time-zone Europe/Kiev -t h4 -v true -fl true -f csv -r 1 --date-format "YYYY-MM-DD HH:mm:ss"
timestamp,open,high,low,close,volume
...
2024-02-26 18:00:00,1.08509,1.08555,1.08397,1.08462,27007.27
2024-02-26 22:00:00,1.08462,1.08525,1.08461,1.08503,19380.15
Please let me know if you have any questions, thanks again!
from dukascopy-node.
@dekaidekai
I've released an experimental support for formatting dates (--date-format
) and option to convert them to a custom timezone (--time-zone
), which is what essentially EET setting is doing.
Install new versoon:
npm install [email protected]
Example:
npx dukascopy-node -i eurusd -from 2024-02-26 -to 2024-02-27 -t m1 --date-format "YYYY-MM-DD HH:mm:ss" --time-zone Europe/Kiev -f csv
which outputs:
timestamp,open,high,low,close
2024-02-26 02:00:00,1.08188,1.08202,1.08186,1.08196
2024-02-26 02:01:00,1.08196,1.08198,1.08191,1.08191
2024-02-26 02:02:00,1.08191,1.08194,1.08185,1.08186
2024-02-26 02:03:00,1.08187,1.08191,1.08186,1.08186
more info on --date-format
: #156 (comment)
from dukascopy-node.
Related Issues (20)
- Promise.allSettled is not a function HOT 2
- Downloading other timeframes (h2,h3) caused error HOT 3
- Constant bid and ask volume when downloading tick data HOT 2
- I can't install this fabulous package, here are the logs HOT 6
- Does not work when tried to get aaplususd data, returned empty file HOT 1
- tick data is not tick data HOT 5
- instruments list HOT 3
- [feature] retrieve the batch periodically HOT 2
- [feature] limit settings HOT 2
- [BUG] The connection interrupts when downloading large dataset HOT 1
- Feature request: FST and HXT output HOT 3
- [type] getHistoricalRates result can be a string HOT 3
- getHistoricalRates BID + ASK : out of sync HOT 1
- [feature] Custom output file name HOT 1
- [feature] Some backtesting framework not support timestamp HOT 4
- Feature Request: Download Data by Week
- Unable to fetch partial days HOT 2
- Unable to verify the first certificate error HOT 1
- [feature] cache only, without processing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dukascopy-node.