Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by CocaCola
Today at 02:42
CyberCycle Adaptive Cy
by AndrewAMD
Yesterday at 18:54
How does Zorro handle new strategy/asset?
by Seymour
Yesterday at 15:29
About 1M entities!
by txesmi
Yesterday at 14:16
Montecarlo statistical mode parameter optimization
by AndrewAMD
Yesterday at 13:36
Strategy Development
by OptimusPrime
Yesterday at 02:08
Intercept Friday Daily Close
by tradingest
12/12/18 21:40
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
10 registered (Ayumi, MINER, wdlmaster, kvm, MatPed, 3run, jenGs, 3 invisible), 488 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
rssflc, mahomed, bondz, Neil_G, bobby4h
18118 Registered Users
Topic Options
Rate This Topic
#471582 - 03/10/18 15:40 Bug in first bar of week construction
Zheka Online
Senior Member

Registered: 07/03/17
Posts: 344
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: 26655
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
Senior Member

Registered: 07/03/17
Posts: 344
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
Senior Member

Registered: 07/03/17
Posts: 344
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 (63 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: 26655
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
Senior Member

Registered: 07/03/17
Posts: 344
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: 26655
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
Senior Member

Registered: 07/03/17
Posts: 344
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: 26655
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
Senior Member

Registered: 07/03/17
Posts: 344
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