Dua Yong Rew: I've a question regarding iTime function.
This return 2023.09.20 15:04:08.948 Test (EURUSD,M5) 2023.09.20 00:00:00
For XAUUSD the open time is 2023.09.20 01:00:00
however the return is actually
2023.09.20 15:05:09.729 Test (XAUUSD,H1) 2023.09.20 00:00:00
Is it normal behaviour?
In that case, how to get the correct open datetime?
Yes, that is normal behaviour, because for Daily bars/candles, the opening time is ALWAYS 00:00, no matter what time of the day the first tick arrived.
For each time frame, the opening time is truncated to the start of the time-frame time. For example, Hour bars always open on the hour even if the first tick came in several minutes later within the hour.
You can either analyse the tick data to get the time of the first tick, or analyse the M1 data to get the time of the first minute bar/candle (which will be truncate to the start of the minute).
Yes, that is normal behaviour, because for Daily bars/candles, the opening time is ALWAYS 00:00, no matter what time of the day the first tick arrived.
For each time frame, the opening time is truncated to the start of the time-frame time. For example, Hour bars always open on the hour even if the first tick came in several minutes later within the hour.
You can either analyse the tick data to get the time of the first tick, or analyse the M1 data to get the time of the first minute bar/candle (which will be truncate to the start of the minute).
Thank you
I guess more work needed to just get the correct opening time
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I've a question regarding iTime function.
This return 2023.09.20 15:04:08.948 Test (EURUSD,M5) 2023.09.20 00:00:00
For XAUUSD the open time is 2023.09.20 01:00:00
however the return is actually
2023.09.20 15:05:09.729 Test (XAUUSD,H1) 2023.09.20 00:00:00
Is it normal behaviour?
In that case, how to get the correct open datetime?