Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, aliswee), 835 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
MT4/5 - wrong M1 time #480286
05/30/20 06:34
05/30/20 06:34
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Hi,

Zorro FX data is in UTC
Quote
All downloaded prices are usually aligned to UTC time...


but in the script "Zorro.mq4" - command CMD_HISTORY return time candle with this code:

Code
int time = (int)iTime(Asset,timeframe,shift);
arr[4] = time + 60*timeframe; // assume tick start time


but i missing shift from servertime to UTC time.
For this I thinking data download from MT4 is wrong. Many server is +2GMT but I see also +1GMT nad +3GMT.

Is a true?

If yes, I know, how to make correct in the Zorro.mq4.

Milan

Re: MT4/5 - wrong M1 time [Re: Grat] #480290
05/30/20 09:23
05/30/20 09:23
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
I had compare data with come with Zorro and data downloaded from MT4

at first - data which is downloaded from MT4 - TimeZone is OK


[Linked Image]

but if use data from Zorro - have a different Timezene

[Linked Image]

Attached Files zdate1.jpgzdate2.jpg
Last edited by Grat; 05/30/20 09:27.
Re: MT4/5 - wrong M1 time [Re: Grat] #480291
05/30/20 09:58
05/30/20 09:58
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
how to repare:

in the file zorro.mq4

row (353-354):

int start = (int)arr[1]+(timeframe*timeZone);
int end = (int)arr[2]+(timeframe*timeZone);

and row 77 ( not important )
extern int timeZone = -2; // if server is +2GMT

is only temporary - becouse must be add the DST

MT4 servers are GMT +2 or GMT +3 depending on New York DST (Daylight Savings Time)

( not tested !! )

Last edited by Grat; 05/30/20 18:36.
Re: MT4/5 - wrong M1 time [Re: Grat] #480299
05/30/20 19:14
05/30/20 19:14
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
maybe this is a better:

BrokerZone = UTC+2;

Re: MT4/5 - wrong M1 time [Re: Grat] #480307
05/31/20 09:39
05/31/20 09:39
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
As far as I know the MT4 bridge corrects the time so that it is UTC when it is received from Zorro.

Re: MT4/5 - wrong M1 time [Re: Grat] #480313
05/31/20 10:13
05/31/20 10:13
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
I testeted - look picture above.
First have data dowloaded from MT4
SEC - use data comming with Zorro.

Is a different.

Re: MT4/5 - wrong M1 time [Re: Grat] #480315
05/31/20 10:31
05/31/20 10:31
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
Hm, Zorro entered a trade at a bar of 16:15 and in your screenshot it looks as if the same bar is in the MT4 chart at 18:15. Is 16:15 UTC not the same as 18:15 local time? Or do I not understand something?

Re: MT4/5 - wrong M1 time [Re: Grat] #480327
06/01/20 08:47
06/01/20 08:47
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
with year 2019 ( zorro data ) -> zorro open trade in 16:15 - on the MT4 is real 18:15 - this is a correct. MT4 have a 2 hour shift from UTC.

But with data downloaded from MT4 - zorro stored with date comming from MT4, not the shift to UTC. In this case Zorro open trade on the same time like see in the MT4 chart.
This is correct, becouse Zorro don't know how many is shifted MT4 server. Now is standard +2/3 depend the DTS. But any obscure brokers have different timezone.

In the MT4 can be calculace this shitmend but only if is market time. During weekend send the wrong.

In the MT4I have:

Code
        extern int nAddH=2;  
        int nDow=TimeDayOfWeek(TimeLocal());
        if(nDow==0 || nDow==6){
            nGMT=-60*60*nAddH;
            Print("Week: ",nGMT);
        }else{
            nGMT=(int)(TimeGMTOffset()-TimeCurrent()+TimeLocal());
            Print("WORK: ",nGMT," DW: ",nDow);
        }

Last edited by Grat; 06/01/20 08:52.
Re: MT4/5 - wrong M1 time [Re: Grat] #480334
06/01/20 12:34
06/01/20 12:34
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Your screenshots above all look ok to me, so I can't see the problem. Can you show a screenshot with no time shift?

Re: MT4/5 - wrong M1 time [Re: Grat] #480339
06/01/20 17:05
06/01/20 17:05
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
If see on first jpg - Zorro open in 11:00 the same like in MT4 - 11:00 ... this data is download from MT4 - data 100% not in UTC but in MT4 server zone

Page 1 of 3 1 2 3

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1