Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,161 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Timestamps of M1 bars from IB #469896
12/12/17 20:53
12/12/17 20:53
Joined: Jul 2017
Posts: 787
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 787
Quote:
In [Test] mode, bar generation is based on the UTC time stamps of the historical price data. For M1 data it is supposed that the time stamps indicate the end (not the start) of a tick....In [Trade] mode, bar generation is based on UTC time from the PC clock, not on the broker's server time

Zorro records historical M1 bars from IB with time stamps indicating start of a bar. Is this by design or a bug?
Timestamps in RT are end of bar.

Re: Timestamps of M1 bars from IB [Re: Zheka] #469903
12/13/17 07:34
12/13/17 07:34
Joined: Jul 2000
Posts: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
Frankfurt
I'm afraid you're right. This could be a bug. I'll forward it to the developer and if it is so, it will be fixed in the next update.

Re: Timestamps of M1 bars from IB [Re: jcl] #470245
01/04/18 22:04
01/04/18 22:04
Joined: Jul 2017
Posts: 787
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 787
JCL,
I have seen mention of changes to IB plugin in the "What's New" and thought the problem is fixed.
However, upon deleting/reloading the data with the updated plug-in, I still see the timestamps reflecting bar start.

Digging deeper, I found that even the EUR/USD data supplied with Zorro are also timestamped with the start of the M1 bar (See screen attached).
When aggregating M1 ticks into bigger bars, Zorro then correctly timestamps them, but this difference between raw data and aggregated is confusing.

Also, the price in the log for each bar shows Bar OPEN- which is very inconvenient and confusing when debugging.
Can this please be made consistent with timestamping and also reflect bar Close?

Attached Files
Zorro_timestamps.PNG (11 downloads)
Re: Timestamps of M1 bars from IB [Re: Zheka] #470255
01/05/18 09:09
01/05/18 09:09
Joined: Jul 2000
Posts: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
Frankfurt
AFAIK, all M1 data supplied with Zorro has bar end timestamps. The discrepancy might be due to rounding differences. Here's a simple script for printing time stamps and prices:

function run()
{
BarPeriod = 1;
set(LOGFILE);
printf("#n%.5f %.5f %.5f %.5f", priceOpen(), priceHigh(), priceLow(), priceClose());
}

The price in parentheses in the log is indeed the open, and the close would probably make more sense - we'll change that in a future version and will also look in the rounding issue. When you set Verbose to 3, it prints the open, high, low, and close.

Re: Timestamps of M1 bars from IB & Bar construction [Re: jcl] #470257
01/05/18 11:59
01/05/18 11:59
Joined: Jul 2017
Posts: 787
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 787
I just tested it with your script. Running it on M1, all is fine: timestamps do look to be end of bar and closes in the log coincide with raw data.

However, running the script with BarPeriod=5 shows there is a problem with larger bar construction (see attached).

Cockroach?

Attached Files
Zorro_1min_bars.PNG (9 downloads)
Zorro_5min_bars.PNG (8 downloads)

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