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 (SBGuy), 652 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

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

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
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: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

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

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
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: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
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 | 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