Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 672 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
new SET_PATCH=8 #477756
07/26/19 14:42
07/26/19 14:42
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784

The manual says that this new command will use Server time calculated "on the Zorro's side".

Since bar building/internal Zorro time is in UTC already (because Zorro calculates the offset to the broadcast broker time at login), then what does this new setting actually affect?

Re: new SET_PATCH=8 [Re: Zheka] #477758
07/26/19 15:05
07/26/19 15:05
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Internally and externally, both are UTC, so that's irrelevant.

Without the patch, the plugin pushes the server's time to Zorro (but only if the server's time is made available).

With the patch, the plugin outputs nothing, so Zorro uses your computer's clock time.

Re: new SET_PATCH=8 [Re: AndrewAMD] #477762
07/26/19 19:22
07/26/19 19:22
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
Originally Posted by AndrewAMD
Without the patch, the plugin pushes the server's time to Zorro
With the patch, the plugin outputs nothing, so Zorro uses your computer's clock time.
Only at connect, to determine offset? or not only?
If MT4 broker time is UTC+3 and my computer is in UTC, then how will historical bars from MT4 be timestamped with this patch? as if they were UTC?
Originally Posted by AndrewAMD
(but only if the server's time is made available).
What will happen if MT4 does not "provide" server time? Is there a way to set/override time manually to the required one - so that it works reliably 100% of the time in a given broker-user_trading_server setup?

Re: new SET_PATCH=8 [Re: Zheka] #477764
07/26/19 19:32
07/26/19 19:32
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
Probably, the answer to the last question is to set your computer time to the known MT4 server time and use this PATCH.

Will this work or in practice MT4 broker servers can occasionally change their times ?

Last edited by Zheka; 07/26/19 19:32.
Re: new SET_PATCH=8 [Re: Zheka] #477765
07/26/19 19:35
07/26/19 19:35
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Originally Posted by Zheka
Only at connect, to determine offset? or not only?
All the time. Zorro makes many, many calls to BrokerTime().

Originally Posted by Zheka
If MT4 broker time is UTC+3 and my computer is in UTC, then how will historical bars from MT4 be timestamped with this patch? as if they were UTC?
Ask the plugin writer - this is implementation-defined.

Originally Posted by Zheka
What will happen if MT4 does not "provide" server time? Is there a way to set/override time manually to the required one - so that it works reliably 100% of the time in a given broker-user_trading_server setup?
MT4 does provide a server time. In the event that a server does not, it's as if the patch was being used.

Re: new SET_PATCH=8 [Re: AndrewAMD] #477767
07/26/19 19:42
07/26/19 19:42
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
Originally Posted by Zheka
Only at connect, to determine offset? or not only?
I should have asked differently: Is offset to broker time determined at login only and then applied to timestamps returned by BrokerTime?

Re: new SET_PATCH=8 [Re: Zheka] #477768
07/26/19 19:48
07/26/19 19:48
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Originally Posted by Zheka
I should have asked differently: Is offset to broker time determined at login only and then applied to timestamps returned by BrokerTime?
If there is an "offset", this depends on how the plugin writer wrote it.

As an example, I wrote the Ally Plugin. The time stamps were always in a known time zone - Eastern Time, with or without daylight savings. So I hard-coded it to correctly translate to UTC every time. This is a no-guesswork setup. I cannot comment on the MT4 setup.

Re: new SET_PATCH=8 [Re: Zheka] #477798
07/29/19 19:59
07/29/19 19:59
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
JCL,

would you be so kind to clarify the following re MT4 plugin:

- If MT4 broker time is UTC+3 and my computer is in UTC, then - on occasions when MT4 server does not provide its time - how will historical bars from MT4 be timestamped with and without this PATCH?

- what's the recommended approach to ensure that broker time(or rather offset to broker time to UTC) is identified/set correctly 100% of the time, regardless of MT4 server lack of response?
Can there be a new variable introduced that would allow to hard-code broker-time -> UTC offset?

Thank you.

Last edited by Zheka; 07/29/19 19:59.
Re: new SET_PATCH=8 [Re: Zheka] #477805
07/30/19 07:02
07/30/19 07:02
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
All broker plugins must deliver time stamps in UTC. No need for a variable.

Re: new SET_PATCH=8 [Re: jcl] #477807
07/30/19 08:47
07/30/19 08:47
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
This is clear.
But I am seeking to remedy a situation when MT4 server (or MT4 plugin) fails to provide time, hence my questions.

Page 1 of 2 1 2

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1