Gamestudio Links
Zorro Links
Newest Posts
Please consider
by DriftWood
Today at 03:10
Draw stuff from other thread
by Superku
Yesterday at 23:25
Partial fills with MT4 in live trading?
by Sphin
Yesterday at 19:06
New Zorro version 1.83
by DdlV
Yesterday at 13:55
Cubemaps losing mipmaps
by Quad
Yesterday at 12:37
Zorro & virtual desktops & Installation
by jcl
Yesterday at 10:59
ccyStrength() only working for some Currencies
by sdh309795gaas
07/18/18 05:02
AUM Magazine
Latest Screens
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Forgotten Tales - Demo version
RPG PARTY
Who's Online
13 registered (Superku, 3run, Quad, Hredot, kvm, mk_1, alibaba, jenGs, 3 invisible), 514 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
DJ_Algo, tang, stuvwx210277, refltr, hillab
18002 Registered Users
Topic Options
Rate This Topic
#471582 - 03/10/18 15:40 Bug in first bar of week construction
Zheka Online
Member

Registered: 07/03/17
Posts: 294
JCL,

with Weekend=1, the very first bar of the week is constructed incorrectly (1 M1 shift). The next bars are ok.

v 1.79.7


Attachments
Zorro_1stbar_bug_weekend1.PNG (73 downloads)


Top
#471635 - 03/12/18 10:17 Re: Bug in first bar of week construction [Re: Zheka]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26397
Loc: Frankfurt
Thanks, we'll look into this. It is probably a rounding error again.

Top
#471643 - 03/12/18 15:11 Re: Bug in first bar of week construction [Re: jcl]
Zheka Online
Member

Registered: 07/03/17
Posts: 294
Quote:
It is probably a rounding error
It starts and ends 1 min earlier than it should.

Top
#471734 - 03/17/18 15:55 Re: Bug in first bar of week construction [Re: Zheka]
Zheka Online
Member

Registered: 07/03/17
Posts: 294
JCL,

In 1.80.2 the above-mentioned bug is fixed.

However, a new bug appeared!

The bar is just skipped/not constructed despite data exist in the database, which screws further frame construction.
I suspect the reason is its o-h-l-c are all the same, but that's the way it indeed happened.


Attachments
Zorro_barconstruction_bug_2.PNG (62 downloads)


Top
#471757 - 03/19/18 11:40 Re: Bug in first bar of week construction [Re: Zheka]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26397
Loc: Frankfurt
We have not yet fixed or looked into it. Only the timestamp rounding was made slightly more restrictive in 1.80.2, for avoiding a bit more rounding errors. But we cannot round too much, or else we lose precision.

O-H-L-C all the same is normal and not a bug.

Top
#471760 - 03/19/18 12:58 Re: Bug in first bar of week construction [Re: jcl]
Zheka Online
Member

Registered: 07/03/17
Posts: 294
What is meant by "rounding"?
These are historical M1 data with exact timestamps, already rounded to a whole minute.
Anyway, it has to be verified and confirmed that the first bar of the week starts on time and is of duration specified by BarPeriod/BarOffset.

Quote:
O-H-L-C, all the same, is normal and not a bug.
Sure. I did not imply it is.

The bug is that a bar is not constructed/is skipped, despite data exist in a database.

Please have a look at the screenshot.

Top
#471780 - 03/19/18 18:49 Re: Bug in first bar of week construction [Re: Zheka]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26397
Loc: Frankfurt
Sorry, I meant "not causing a bug".

Rounding applies a small time delay to any timestamp for avoiding rounding errors like this one that you reported here.

Top
#471899 - 03/24/18 14:48 Re: Bug in first bar of week construction [Re: jcl]
Zheka Online
Member

Registered: 07/03/17
Posts: 294
JCL,

in 1.80.6 this bug is still present.

I can understand rounding in live trading where timestamps are determined on-the-go, but timestamps of historical data are unambiguous...

If ZHistoryEditor displays raw data correctly, then - what's the problem?
Such basic functionality should be reliable...One way or another.

Top
#471929 - 03/27/18 09:45 Re: Bug in first bar of week construction [Re: Zheka]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26397
Loc: Frankfurt
Rounding is needed for any data series that is sampled in fixed time intervals. Since the timestamps have random fluctuations and can end up right or left of a minute boundary, trading platforms round them down by applying a time offset. Has nothing to do with live trading. - Update: We could confirm the rounding issue. It will be fixed in the next release. A bug with a skipped bar could not be reproduced. If you think you got a wrong bar, please post that script here or send it to support.

Top
#472018 - 04/02/18 14:27 Re: Bug in first bar of week construction [Re: jcl]
Zheka Online
Member

Registered: 07/03/17
Posts: 294
Yes, I embarked on exporting data from IB/ importing into Zorro myself and did stumble on this very issue: all bars got shifted until I added 100ms to the timestamps...
But this has probably more to do with the exactness of float/double representation, isnt' it?

It probably makes sense to have different rounding algorithms for historical data and live data.

Quote:
If you think you got a wrong bar, please post that script here or send it to support
How can a script possibly influence bar formation by Zorro?

I would rather retest after the basic rounding fix is implemented and then report again.

Top


Moderator:  jcl, Nems, Spirit, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de