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
1 registered members (degenerate_762), 1,098 guests, and 2 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 2 1 2
StartDate setting leads to 'Warning 047' #485414
03/08/22 17:34
03/08/22 17:34
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
I've recently upgraded Zorro to 2.44 and I've noticed an issue with the StartDate. It works well when I set this to the beginning of the year, but I get a 047 warning once I adjust it to a later date. As a result, Zorro starts reading my .t6 data for the following year.

Quote
function run()
{
History = ".t6";
BarPeriod = 1;
//StartDate = 20200101;//OK
StartDate = 20200201;//Warning 047: EUR/USD first bar on 2021-01-03...

if(Bar > 0)
{
//returns: 'Date: 210103 23:01:00 | Price: 1.22375' when StartDate = 20200201
printf("\nDate: %s | Price: %.5f",strdate(YMDHMS,ldate(UTC,0)), priceClose());
quit();
}
}

Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485421
03/09/22 10:09
03/09/22 10:09
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Maybe some gap in your historical data? When I test your script with the latest Zorro version, FXCM Assets, and EUR/USD, I get:

20200201: Date: 200131 18:39:00 | Price: 1.10787
20200101: Date: 191231 09:19:00 | Price: 1.12083

That's what I would expect.

Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485429
03/09/22 14:03
03/09/22 14:03
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
I wrote my data to a CSV file for further inspection (I can't run ZHistoryEditor.exe under Wine).

For 2020 this starts at StartDate = 20200102.

As you can see there's no gap between the Jan 2 and Jan 3 2020:

200102 23:59:00,1.11715
200103 00:00:00,1.11715

However, once I change StartDate to 20200103, Zorro's screen output becomes:

Warning 047: EUR/USD first bar on 2021-01-03
Test: TestStartBar EUR/USD 2020..2022
Assets AssetsIG
Date: 210103 23:01:00 | Price: 1.22375

I've added 'LookBack = 0;' to my test code, to make sure it was printing the first bar, based on the given StartDate.

Last edited by Grant; 03/09/22 15:22.
Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485431
03/09/22 16:59
03/09/22 16:59
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Update, I've downgraded to Zorro 2.40 and now it returns the correct data: '200103 00:01:00 | Price: 1.11706' when 'StartDate = 20200103' & 'LookBack = 0'

Since you don't have this issue, maybe there's a problem with how Wine handles Zorro 2.44?
From what I remember, that there was a date issue with Wine.

Edit: found that thread -> https://bugs.winehq.org/show_bug.cgi?id=47221

Last edited by Grant; 03/09/22 17:12.
Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485442
03/10/22 17:17
03/10/22 17:17
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Hmm, that bug has meanwhile a workaround in Zorro. I would also assume that a Wine bug affects also 2.40.

Can you test it on a Windows PC?

Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485445
03/10/22 21:06
03/10/22 21:06
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Under Windows 10 only Zorro 2.40 returns the correct date, but Zorro 2.44 returns the bar from 1 year later.

[Linked Image]

Without using 'LookBack = 0' it does return the correct date with Zorro 2.44. Is this expected behavior?

Last edited by Grant; 03/10/22 21:16.
Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485446
03/10/22 21:38
03/10/22 21:38
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
Looks ok, unless the error message is wrong. Have you checked the 2022 and 2020 history?

Re: StartDate setting leads to 'Warning 047' [Re: Petra] #485447
03/10/22 21:42
03/10/22 21:42
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Only the 2022 history is missing, but that's not the issue because it switches from 2020 to 2021 when 'StartDate = 20200103' & 'LookBack = 0'
2020 & 2021 sets are OK, I've used those many times before without any issues with Zorro 2.40

Last edited by Grant; 03/10/22 22:01.
Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485451
03/11/22 08:50
03/11/22 08:50
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
The reason for switching is that the 2019 file is used when you dont set lookback = 0. But the 2020 problem is not clear. It does not happen here. Can you test it with the latest version 2.46? Does it happen with other start dates or only with 2020? You can also contact support, they will work with you to sort that out.

Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485496
03/17/22 18:20
03/17/22 18:20
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Sorry for my late response.

I've removed the LookBack setting, but there's still a different date output. When I install Zorro 2.44 in the same directory as Zorro 2.40, it returns 'Date 200102...' when 'StartDate = 20200102', but when I install Zorro 2.46 beta under a new directory, it returns 'Date: 191231...' with the same script.

I thought, let's check the .t6 files and I've noticed that the 2.40 version for 'EURUSD_2020.t6' was 11,638 kb v.s. 11,465 kb for the Zorro 2.46 version (and probably Zorro 2.44 under a fresh directory as well), so I've replaced this one in my formal 2.40 directory (where's 2.44 is installed) by the newer (and smaller!) one, but there's still an output difference after restarting Zorro 2.44.

[Linked Image]

Last edited by Grant; 03/17/22 20:32.
Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485504
03/18/22 09:36
03/18/22 09:36
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Ok, but is the date correct? Startdate minus lookback? Or do you still get warning 47?

The date of the first bar should be the first timestamp of the 2020 file minus the number of bars for the lookback period, with considering gaps and weekends.

Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485505
03/18/22 12:07
03/18/22 12:07
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
The trade date 200102 is correct, since this was the first trading day of 2020.
No, I don't receive that 047 warning anymore (I forgot to mention this, sorry).
The issue is that my Zorro versions return different date outputs with the same code and the same .t6 files. You can see this on my last screenshot.

Code
function run()
	{
	History = ".t6";
	BarPeriod = 1;
	StartDate = 20200102;

	if(Bar > 0)
		{
		printf("\nDate: %s | Price: %.5f",strdate(YMDHMS,ldate(UTC,0)), priceClose());
		quit();
		}
	}		
			

Last edited by Grant; 03/18/22 12:10.
Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485510
03/18/22 17:17
03/18/22 17:17
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
For 200102 you must set Lookback = 0. The default lookback is 80 bars and can go back to 2019 depending on history.

Re: StartDate setting leads to 'Warning 047' [Re: Grant] #485513
03/18/22 18:04
03/18/22 18:04
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
With the same .t6 files and LookBack = 0 both outputs are more identical.

Zorro 2.44 (which was installed in a formal 2.40 directory) returns 'Date 200102 07:02:00..'
Zorro 2.46 (and probably Zorro 2.44 in a fresh directory as well) returns 'Date 200102 07:01:00..'.

I'm wondering what's causing this.

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