Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 04/05/26 10:06
TMFs on options in live trading
by Spirit. 03/26/26 19:52
TDAmeritrade plugin with new Schwab accountt?
by AndrewAMD. 03/24/26 17:11
Black Book, 4th edition
by jcl. 03/17/26 09:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (TipmyPip, Grant, vince, 1 invisible), 4,341 guests, and 16 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ondrej, mredit, vestriaa, Lukudo, mldenoiser
19205 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Gaps after weekend due to time zone problem in Z12+ and Z6+ #489336
04/01/26 18:13
04/01/26 18:13
Joined: Dec 2017
Posts: 19
V
vince Online OP
Newbie
vince  Online OP
Newbie
V

Joined: Dec 2017
Posts: 19
I think there is a problem in Z12+ and Z6+ regarding the time zone.
These strategies "live" in EST / Eastern Standard Time (New York) as it seems which is UTC-5.
Because of that the market closed trigger is active too late on Friday/Saturday and the market open trigger on Sunday/Monday is also too late when trading in Europe.
This leads to duplicated/multiplied price quotes before the weekend mode and missing prices and too late continuing trading after the weekend.

Here is an example of a Z12+ run:

Lookback in the log file:
[1870: Fri 26-02-27 13:00] (1.36290)
[1871: Fri 26-02-27 14:00] (1.36316)
[1872: Fri 26-02-27 15:00] (1.36395)
[1873: Fri 26-02-27 16:00] (1.36369)
[1874: Fri 26-02-27 17:00] (1.36369) <-- same price as before!
[1875: Fri 26-02-27 18:00] (1.36369) <-- same price as before!
[1876: Fri 26-02-27 19:00] (1.36369) <-- same price as before!
[1877: Sun 26-03-01 23:00] (1.36487)
[1878: Mon 26-03-02 00:00] (1.36584)

Trading:
[Fri 26-03-13 15:00] 9914 0 0/2 (1.37292)
[Fri 26-03-13 16:00] 9935 0 0/2 (1.37180)
[Fri 26-03-13 17:00] 9935 0 0/2 (1.37195)
[Fri 26-03-13 18:00] 9935 0 0/2 (1.37195)
[Fri 26-03-13 19:00] 9935 0 0/2 (1.37195)
Market closed on 03-14 01:00:03 (local 20:00) <-- local 20:00 is wrong! It probably was 2:00 in Germany on Saturday
Market open on 03-16 04:00:07 (local 23:00) <-- local 23:00 is wrong! It probably was 5:00 in Germany on Monday
[Fri 26-03-13 20:00] 9813 0 0/2 (1.37127)

In an additional test with Z12+ (started with EUR/USD set in Zorro) I checked the actual prices to be able to match the real German time. The lookback looked like this:
[4124: Fri 26-03-27 14:00] (1.15167)
[4125: Fri 26-03-27 15:00] (1.15062) <-- Friday 21:00 in Germany (close price 21:59)
[4126: Fri 26-03-27 16:00] (1.15062)
[4127: Fri 26-03-27 17:00] (1.15062)
[4128: Fri 26-03-27 18:00] (1.15062)
[4129: Fri 26-03-27 19:00] (1.15062)
[4130: Sun 26-03-29 23:00] (1.15153) <-- Monday 5:00 in Germany (close price 5:59)
[4131: Mon 26-03-30 00:00] (1.15133)
[4132: Mon 26-03-30 01:00] (1.15154)
[4133: Mon 26-03-30 02:00] (1.15125)
End of lookback period at 07:25:30
--> Friday 15:00 price is there multiple times, but Sunday 23:00 to Monday 5:00 prices are missing

The same applies to Z6+.
Z7 on the other hand is not affected.
Maybe it is a problem with the C++-based strategies?

I tested with MT4 bridge on a demo account if that matters.

Last edited by vince; 04/01/26 18:20.
Re: Gaps after weekend due to time zone problem in Z12+ and Z6+ [Re: vince] #489337
04/01/26 19:49
04/01/26 19:49
Joined: Sep 2003
Posts: 938
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 938
Forex strategies dont live in New York or german time. Forex is traded 24 hours, weekend is Fri 20:00 - Sun 23:00 UTC unless you set up something different.

Re: Gaps after weekend due to time zone problem in Z12+ and Z6+ [Re: vince] #489338
04/01/26 20:51
04/01/26 20:51
Joined: Dec 2017
Posts: 19
V
vince Online OP
Newbie
vince  Online OP
Newbie
V

Joined: Dec 2017
Posts: 19
Sure, but I didn‘t configure anything regarding weekend.
For Z7 the weekend period is determined as it should be while Z6+ and Z12+ go to weekend mode in New York time — not UTC time.
(and they print the New York time in the log as local time)
This is 100% reproducible here.

Last edited by vince; 04/01/26 20:54.
Re: Gaps after weekend due to time zone problem in Z12+ and Z6+ [Re: vince] #489339
04/01/26 20:58
04/01/26 20:58
Joined: Sep 2003
Posts: 938
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 938
But your log is utc. No new york. The displayed time is your PC time converted to utc. If it is wrong then the clock or time zone on the PC is set wrong?

Re: Gaps after weekend due to time zone problem in Z12+ and Z6+ [Re: vince] #489340
04/01/26 21:18
04/01/26 21:18
Joined: Dec 2017
Posts: 19
V
vince Online OP
Newbie
vince  Online OP
Newbie
V

Joined: Dec 2017
Posts: 19
It is running on the same PC where Z7 shows the correct UTC time.
I just checked again.
For the current hour (23:.. in Germany) Z7 shows:
[Wed 26-04-01 21:07]
On the other hand Z6+ and Z12+ show this:
[Wed 26-04-01 16:00]
So this is UTC-5.

Re: Gaps after weekend due to time zone problem in Z12+ and Z6+ [Re: vince] #489341
04/01/26 21:30
04/01/26 21:30
Joined: Sep 2003
Posts: 938
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 938
My Z6+ shows 21:28. I dont think C++ has a different time than C so the reason is probably something else, otherwise other people had also a wrong time. Maybe you should contact the support and send them the log.

Re: Gaps after weekend due to time zone problem in Z12+ and Z6+ [Re: Spirit] #489342
04/02/26 06:45
04/02/26 06:45
Joined: Dec 2017
Posts: 19
V
vince Online OP
Newbie
vince  Online OP
Newbie
V

Joined: Dec 2017
Posts: 19
OK, weird.
And a quick Trade check with something like
Code
function run() {
	printf("hour: %d, lhour(CET): %d, tod: %d, ltod(CET): %d\n", hour(0), lhour(CET, 0), tod(0), ltod(CET, 0));
}

or a Test run with
Code
function run() {
	Verbose = 2;
	set(LOGFILE);
}

shows the same output regardless if it is a C script or C++.

So no idea why I see the mentioned behavior in Z6+ and Z12+.
I will do some more examination and experiments, I think.
Thanks!

Re: Gaps after weekend due to time zone problem in Z12+ and Z6+ [Re: vince] #489343
04/02/26 07:11
04/02/26 07:11
Joined: Jul 2000
Posts: 28,091
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,091
Frankfurt
I can confirm that C++ cannot be the reason, but there is a possible reason when the MT4 server has a wrong time zone. When the broker server provides the time, as with MT4, it is not taken from the PC but from the server. But you should see this in the start message of the log. The MT4 time difference is printed there. If you cannot find the problem, you can contact us under our support email and we'll check your logs.

Re: Gaps after weekend due to time zone problem in Z12+ and Z6+ [Re: Spirit] #489351
10 hours ago
10 hours ago
Joined: Dec 2017
Posts: 19
V
vince Online OP
Newbie
vince  Online OP
Newbie
V

Joined: Dec 2017
Posts: 19
Back after holidays I did some more tests.

To be 100% sure it has nothing to do with my system or Zorro installation I tested on a different computer that had never any Zorro version or MetaTrader installed.
So I downloaded the current Zorro version (3.0.1.6) and installed it.
To rule out MT4 problems I used the Simulator broker plugin.
Z1+ started in trade mode at about 10:50 German (summer/daylight saving) time resulted in this:
Code
Z1+ V1.0: X PH H4 B0 V1 SF0.0 
...
V 3.016 on Tue 26-04-07 10:50:19
LookBack set to 2000 bars

Trade: Z1+  2026-04-07
Lookback 2000 bars, 2025-12-05..(NaD)
[1: Fri 25-12-05 03:00] .
[2: Fri 25-12-05 04:00] 
...
[1983: Mon 26-04-06 23:00] 
[1984: Tue 26-04-07 00:00] 
[1985: Tue 26-04-07 01:00] 
[1986: Tue 26-04-07 02:00] 
[1987: Tue 26-04-07 03:00]              <-- UTC-5!

End of lookback period at 08:50:21      <-- UTC

[1988: Tue 26-04-07 04:00] (2.03423)    <-- UTC-5! 11:00 German time (CEST)

Please try to reproduce it. I did not change any file (like Zorro.ini or z.ini), it is a clean Zorro with Z1+ on Simulator broker plugin.

Originally Posted by Spirit
My Z6+ shows 21:28.

I misinterpreted this last week. Now I think you noted the current time shown by Zorro and not the hourly line in the log, right?

More experiments:
I tried Z6+ on Zorro 2.7. The time shift was not there yet at that version, the correct UTC time is used!
As an additional test I just copied over the Z6+.dll from Zorro 2.7 to Zorro 3.0.1.5. This gives the same (not time shifted) result as in Zorro 2.7.
So it seems to be something in the Z*+-strategies or how they are compiled in Zorro 3?

Last edited by vince; 4 hours ago.
Re: Gaps after weekend due to time zone problem in Z12+ and Z6+ [Re: vince] #489352
3 hours ago
3 hours ago
Joined: Jul 2000
Posts: 28,091
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,091
Frankfurt
Z12+ and Z6+ have changed, but this should not affect the time zones. We don't see a time shift with our test systems. Maybe it°s a side effect of something else. Can you contact the support and send both logs?


Moderated by  Petra 

Gamestudio download | 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