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 (AndrewAMD), 559 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
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,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
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.
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