Gamestudio Links
Zorro Links
Newest Posts
Accessing time series in TMF
by AndrewAMD. 10/23/19 20:16
priceClose() in TMF
by AndrewAMD. 10/23/19 20:11
ZeroMQ
by felixfx. 10/23/19 20:04
Issue with Starter Window
by txesmi. 10/23/19 09:22
Accessing All Historical Price Data
by JohnJits. 10/22/19 22:37
file_write var array ?
by laz. 10/22/19 16:00
SAV_STATS
by MatPed. 10/22/19 13:57
Instrument Price Zorro Chart
by jcl. 10/22/19 10:39
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
7 registered members (Dooley, AndrewAMD, Uhrwerk, Zheka, felixfx, kvm, 1 invisible), 465 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Bolle, VillageTalkies, line7, Shutch, Clifford_B
18311 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: 408
Z
Zheka Online OP
Senior Member
Zheka  Online OP
Senior Member
Z

Joined: Jul 2017
Posts: 408

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: 776
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 776
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: 408
Z
Zheka Online OP
Senior Member
Zheka  Online OP
Senior Member
Z

Joined: Jul 2017
Posts: 408
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: 408
Z
Zheka Online OP
Senior Member
Zheka  Online OP
Senior Member
Z

Joined: Jul 2017
Posts: 408
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: 776
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 776
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: 408
Z
Zheka Online OP
Senior Member
Zheka  Online OP
Senior Member
Z

Joined: Jul 2017
Posts: 408
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: 776
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 776
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: 408
Z
Zheka Online OP
Senior Member
Zheka  Online OP
Senior Member
Z

Joined: Jul 2017
Posts: 408
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,033
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,033
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: 408
Z
Zheka Online OP
Senior Member
Zheka  Online OP
Senior Member
Z

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

Re: new SET_PATCH=8 [Re: Zheka] #477808
07/30/19 08:57
07/30/19 08:57
Joined: Jul 2000
Posts: 27,033
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,033
Frankfurt
When the MT4 server fails to provide time, the remedy is not to trade until the server is fixed.

Page 1 of 2 1 2

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