There is no bug. Your local time zone is irrelevant. The chart is broker's time zone only.
-
FX opens 5pm ET Sunday and ends 5pm ET Friday. Some brokers start after (6pm is common/end before (up
to 15 minutes) due to low volatility.
Checking for Market Closed - Expert Advisors and MQL5 programming forum Trading - MQL5 programming forum
Swap is computed 5pm ET. No swap if no open orders at that time. Brokers use a variety of timezones. Their local time (with or without DST,) GMT/UTC, GMT+2, NY+7.
Only with NY+7 does the broker's 00:00 equals 5pm ET and the start of a daily bar (and H4) is the start of a new FX day.
GMT brokers, means there is a 1 or 2 hour D1/H4 bar on Sunday (depending on NY DST,) and a short Friday bar.
GMT+2 is close but doesn't adjust for NY DST.
EET is closer except when their DST doesn't match NY's. Last Sunday of March and 1:00 on the last Sunday of October vs second Sunday in March and return at 2:00 a.m. EDT to 1:00 a.m. EST on the first Sunday in November.
Non-NY+7, means the chart daily bar overlaps the start, and converting broker time to NY time requires broker to GMT to NY timezone conversions.
- If you search the web you will find differing answers. Those are all wrong (half the year) because they do not take DST into account (or that it changed in 2007 [important when testing history.])
My subject is not for when open the market but the synchronization problem between the charts W1 and D1.
My reference for the closing and opening of the market was for explaining to the MT4 stuff when I seen it.
I posted the same day and a second comment on which I referred clearly that:
1. Look on chart time frame W1, the candle of the 12th week of the year 2019.
The candle Open Time is: 2019.03.31 00:00
2. Mark the start of the 12th week with a Vertical Line on chart time frame W1.
3. Change chart time frame to D1
The Vertical Line logicaly is on the first candle of the week and of-course it must match with the first day of the week, which is the Sunday.
( I say that because according the MT4 documentation : int DayOfWeek() Returned value Current zero-based day of the week (0-Sunday,1,2,3,4,5,6).)
5. Look the marked D1 candle Open Time its : 2019.03.29 00:00
From the calendar we get-- Mar 29 is Friday -- Mar 31 is Sunday -- Apr 1 is Monday.
The 2019.03.29 00:00 is Friday, and the Friday according the MT4 documentation is the 5th day, not the last 6th day of the week,
nor the first day of the week which is Sunday(=0).
So, the mistake is that the Chart W1 is not synchronized with the Chart D1.
The mismatch is: the projection (Vertical Line) on the chart time frame D1, of the week candle (W1) open (start) time.
Even on programing, if we use the iBarShift() we get the same wrong as we see it with the vertical line.
Follow the steps and you will see this bug.
Have good day
Tzavaras
p { margin-bottom: 0.25cm; line-height: 120%; }a:link { }
p { margin-bottom: 0.25cm; line-height: 120%; }a:link { }
tzavaras:
1. Look on chart time frame W1, the candle of the 12th week of the year 2019.
The candle Open Time is: 2019.03.31 00:00
3. Change chart time frame to D1The Vertical Line logicaly is on the first candle of the week and of-course it must match with the first day of the week, which is the Sunday.
( I say that because according the MT4 documentation : int DayOfWeek() Returned value Current zero-based day of the week (0-Sunday,1,2,3,4,5,6).)
5. Look the marked D1 candle Open Time its : 2019.03.29 00:00
So, the mistake is that the Chart W1 is not synchronized with the Chart D1.- .
- .
- Line on Sunday, depends on your broker's time zone. I have no Sunday bars with my broker.
- .
- That is impossible unless A) you were not connected to your broker when you switched. If there is a 3/31 W1 candle, then there must be a 3/31 or later D1 candle. If you are connected, it would update and you would see it. B) you don't have auto-scroll enabled and it is just off screen. C) you are connected to Metaquotes and not a broker. There is no mistake, they are always synchronized. Problem is with you. Do you really believe that you've found something that no one has ever found for over a decade?
< Problem is with you. Do you really believe that you've found something that no one has ever found for over a decade? >
Thank you for your Kind words.
It is not matter of religion to <believe >, neither its a emotional approach.
Its a Fact.
Also I am not a competitor to enjoy with that, but I am a long time fun of MT4, and I use it for all my trades.
Maybe is better to see in pictures what I reported, because its not obvious by writing.
Step first. On TF W1 mark with the Vertical-Line the candle.
My cursor is on the candle to see the start date of the W1 candle. Its 2019.03.31. March 31 is Sunday. Till now its OK.
Step second. Just change the TF to the D1 timeframe. Bring my cursor on the vertical line marked candle, which marked the week start.
Then you can read the marked week start on the Day (D1) time frame is 2019.03.29. March 29 is Friday. This is what I reported.
I will not ask you how < .. no one has ever found it for over a decade?? >,
But I will ask you if you are team member of the MT4 platform programmers, to fix it.
My willing is not to point, but to help to be even better this functional great platform.
Thank for your replies.
Tzavaras
I did exactly what you did. 3/31 on W1, changed to D1 still 3/31, changed to H4 still 3/31.
Did you try right click -> refresh on the D1 (when connected?)
Hi William I just changed the TF W1 by click on TF D1.
The platform hook the Vertical Line on the candle Friday Mar 29 2019.
My platform is doing it till now.
On the smaller TFs, is possible to see it on Friday after 17:00 platform time. (See my first comment).
(Also, part of the same issue: If you use DayOfWeek(iTime(Symbol(),Period(),0)) on Friday after 17:00
it will not return 5(=Friday) but it will return 6(=Saturday).
This confusion exist on smaller TFs like H4 H1... from Friday 17:00 till the Friday NYSE closing).
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
MetaTrader 4 - Version:4.00 Build 1170 (20 Dec 2018).
Just today I noticed that bug, on 17:00 platform time.
My local (Summer) time is GMT-4. (And the NY NYSE local (Summer) time is GMT-4 too).
So what happen:
On Friday April 5, 2019
I added a Vertical line on the last candle on my chart which was on TimeFrame W1 to mark the week start.
Then I changed my TimeFrame to the D1.
As long the platform time it was before the 17:00 (NY equal time 10:00), there was 5 candles after the Vertical line, which is right because the Friday is the 5th day of the week.
After the platform time 17:00 (NY equal time 10:00) on chart D1 appeared a new 6th candle, which is not right, and that I want to report.
This is not right because on Friday the NYSE continue to work till 16:00 (NY time),and the working day does not stop on NY time 10:00 (Platform time 17:00), and so why to be come the 6th candle on Friday.
- Some one maybe thing that Japanese day start on platform time 17:00.
Lets see it.
1). The Japan zone time is GMT-9, and the the GMT is -3 hours from the Platform Zone time. (Because Platform zone time is GMT+3).
So the Japan zone time difference from the Platform Zone Time is (-9 +( -3)=) -12 hours..
So, when the platform present the new Day candle at 17:00, on Japan the zone time is 17:00-12 =5:00.
The JPX is opening at 9:00 Japan local time, which is 4 hours later than the 5:00.
That means, even in Japan on working days, the Stock Exchange next day dose not start earlier than the 9:00 Japan local time, which is equal to the Platform local time 21:00 (17:00 + 4 = 21:00).
2). The NYSE which is in NY has Zone time GMT-4, and the the GMT is -3 hours from the Platform Zone time. (Because Platform zone time is GMT+3)
So the NY zone time difference from the Platform Zone Time is (-4 +( -3)=) -7 hours.
The NYCE close is on 16:00 NY local time, which is equal to the 16:00 +7 =23:00 platform local time.
Conclusion: From 1) and 2) we have that the JPX opening on a working day is on 21:00 platform local time and the NYSE closing is on 23:00 platform local time.
No one of them is on 17:00 platform local time,
and so there is no sense to be printed the next day(D1) candle time on 17:00.
It must be synchronized the next day Candle on 21:00 or 23:00 platform local time, otherwise if it remain at 17:00 it does not truthfully represent the D1 price movements.
My proposal is:
a) To correct this bug of your very workable platform, because indicators or EA using combination of the H1, D1 and W1 chart candles maybe will present false signals.
b) Because you have to chose where to close this D1 candles on 21:00 or on 23:00, my opinion is to chose the D1 on 23:00, because this is the closing of the NYSE, and the NYSE has 3-4 times more volume of the JPX, and because the bigger volume, if the D1 candle close on the NYSE closing, it will be more realistic on what was happen during this SE working day. (From start to end, and east to west end, working day).
Thank you for your GRATE JOB on MT4 platform, which I am using it for the last 7 years.
Have a nice weekend.
Ilias Tzavaras