DislikedDid you tested your software(downloaded data) with Eastern European timezone ? I've downloaded three years data with +7 hours shift but I think there is some daylight saving shift hours in March and October for this particular timezone.. Can you fix timezone issues ?Ignored
I'll leave post #320 intact, as it contains some good info, but this new post effectively supersedes it.
I've updated the 'Convert news to GMT' app. Download it from post #1 (latest version is in the link in the green typeface, and you'll find the app in the .../MQL4/Files folder in the zip file). Windows 10 Defender will probably display a virus warning when you try to run it, then it's up to you whether or not you want to take the risk.
Attached Image
Suppose your local daylight savings begins on the first Sunday in April and runs through to the second Sunday in October. Then you would enter 4 (for April) in the 'From Month' and 0 in the 'First Sunday + days', because it is 0 days from the First Sunday.
If DST began 7 days later, i.e. on the second Sunday, you would enter 7 for 'First Sunday + days'.
If DST began 14 days later, i.e. on the third Sunday, you would enter 14 for 'First Sunday + days', and so on.
If DST began 7 days EARLIER than the first Sunday, i.e. on the LAST Sunday in March, then you would still enter 4 for the 'Start Month', and -7 for the 'First Sunday + days'.
So you are ALWAYS working from the first Sunday in your nominated month, and then adding or subtracting a multiple of 7 days to advance or retreat it to a later or earlier Sunday.
The 'To Month' works the same way. Hence if your local cutoff date for DST was the second Sunday in October, you'd set 'To Month' = 10 and 'First Sunday + days' = 7
NOTE: The 'To Month' MUST always be a higher value than the 'From Month'. Failure to do this will cause unpredictable results.
Not confused yet? Read on.
The FIRST 'GMT/UTC + hours' field represents the number of HOURS ahead (enter a positive number) or behind (enter a negative number) GMT/UTC your local time is, during the period of the year that is between the 'From month and the 'To month' (i.e. during the MIDDLE part of the year).
The SECOND 'GMT/UTC + hours' field is the number of hours ahead or behind GMT/UTC your local time is, OUTSIDE of the 'From month and the 'To month', i.e. at the START and END of the year.
Hence if your daylight saving (summer) happens during the middle of the year (in the NORTHERN hemisphere), the value in the first field should probably be 1 hour GREATER than in the value in the second field.
But if your daylight saving (summer) happens at the end of the year (in the SOUTHERN hemisphere), the value in the first field should probably be 1 hour LESS than in the value in the second field.
These values are NOT the number of hours your local time differs from FF calendar (New York), they are the number of hours your local time is ahead or behind GMT/UTC.
NOTE: In ALL cases, to input a positive number, just type a number WITHOUT the + sign, e.g. 9; to input a negative number, type the number with a LEADING minus sign, e.g. -9
The 'GMT/UTC + hours' field may contain a decimal entry, e.g. for 5 hours and 30 minutes behind GMT/UTC, type -5.5 (because 30 minutes is 0.5 hours)
The default values of 4,-7,2,11,-7,1 should work correctly for any location that shares the same daylight saving rules and times with Oslo, Norway.
What if your locality does not have DST? Example: if you live in Hawaii, which is GMT/UTC -10 hours all year round, then your inputs should be 4,0,-10,11,0,-10 (the 4,0 and 11,0 are 'dummy' values that meet the entry requirements)
If you live in New Zealand, as I do, then your inputs should be 4,0,12,10,-7,13 [so, just to recap, these six values mean that from 0 days after the first Sunday in he 4th month (April) through until 7 days before the first Sunday in the 10th month (i.e. this equates to the last Sunday in September), NZ's timezone is GMT/UTC+12 hours; but for the rest of the year, it is GMT/UTC+13 hours. NZ is in the southern hemisphere, hence its DST occurs at the END of the year.]
FYI, the values for FF calendar (New York), which are hardcoded into the software are 3,7,-4,11,0,-5
Hopefully that's enough examples.
To find out your local daylight saving rules, go to World Clock, click on a city that's in the same timezone, and choose the 'Time Zone' tab (see screenshot below). You should be able to work out which Sundays daylight saving starts/ends, and how many hours you're ahead/behind GMT/UTC.
If the above instructions aren't clear, then if you let me know your city/location, I can calculate the six values for you.
The entire FF calendar (news events dating back to 2007) can be downloaded from post #1. You can now use the 'Convert news to GMT' app to convert all of the event times to your local timezone (or any other timezone that you wish).
1