WorthyVII:
It's not obvious. You need to know the GMT zone and DST of the broker server, from there it's possible to calculate correctly. As you noticed GMT offset can be deduced from mql, but it's not possible for DST, you need to ask to your broker.
In live I can use timegmt vs timecurrent to get the offset of the data, which means all my code can correctly use UTC times everywhere and be corrected regardless of the datasource.
How are we supposed to do any kind of time related testing when there seems to be NO way to get the UTC offset of the data?
This seems really obvious. but can we please make timegmt() work properly in the tester?
Alain Verleyen:
It's not obvious. You need to know the GMT zone and DST of the broker server, from there it's possible to calculate correctly. As you noticed GMT offset can be deduced from mql, but it's not possible for DST, you need to ask to your broker.
It's not obvious. You need to know the GMT zone and DST of the broker server, from there it's possible to calculate correctly. As you noticed GMT offset can be deduced from mql, but it's not possible for DST, you need to ask to your broker.
The data used in the tester is from a specific broker. Can MT not just store the broker time offset locally on the broker settings so that it is available in the testing infrastructure?
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
In live I can use timegmt vs timecurrent to get the offset of the data, which means all my code can correctly use UTC times everywhere and be corrected regardless of the datasource.
How are we supposed to do any kind of time related testing when there seems to be NO way to get the UTC offset of the data?
This seems really obvious. but can we please make timegmt() work properly in the tester?