new SET_PATCH=8

Posted By: Zheka

new SET_PATCH=8 - 07/26/19 14:42


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?
Posted By: AndrewAMD

Re: new SET_PATCH=8 - 07/26/19 15:05

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.
Posted By: Zheka

Re: new SET_PATCH=8 - 07/26/19 19:22

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?
Posted By: Zheka

Re: new SET_PATCH=8 - 07/26/19 19:32

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 ?
Posted By: AndrewAMD

Re: new SET_PATCH=8 - 07/26/19 19:35

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.
Posted By: Zheka

Re: new SET_PATCH=8 - 07/26/19 19:42

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?
Posted By: AndrewAMD

Re: new SET_PATCH=8 - 07/26/19 19:48

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.
Posted By: Zheka

Re: new SET_PATCH=8 - 07/29/19 19:59

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.
Posted By: jcl

Re: new SET_PATCH=8 - 07/30/19 07:02

All broker plugins must deliver time stamps in UTC. No need for a variable.
Posted By: Zheka

Re: new SET_PATCH=8 - 07/30/19 08:47

This is clear.
But I am seeking to remedy a situation when MT4 server (or MT4 plugin) fails to provide time, hence my questions.
Posted By: jcl

Re: new SET_PATCH=8 - 07/30/19 08:57

When the MT4 server fails to provide time, the remedy is not to trade until the server is fixed.
© 2024 lite-C Forums