Gamestudio Links
Zorro Links
Newest Posts
long time to load data
by qin. 12/31/25 09:57
The new evaluation shell
by jcl. 12/29/25 09:56
about Zorro S (monthly)
by AndrewAMD. 12/29/25 03:24
Xor Memory Problem.
by TipmyPip. 12/26/25 19:14
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (Quad, Jack_Zodiac), 3,316 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Syndrela, HDRSEO, AOUNZA, digitalboy381, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
run() delayed with IB and many assets #485763
04/20/22 11:51
04/20/22 11:51
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
I'm using BarOffset with daily bars to trigger the run() function at the desired trading time. When I try this out, I notice that the actual execution is delayed around 10 minutes after the time set in the script. When I reduce the number of assets being looped from around 60 to just 3, the delay becomes much shorter as well, though it's still not very precise. I'm assuming this is related to slow price requests from IB.

1. Is there anything that can be done about this, to execute the run() more precisely with many assets?

2. I notice the timestamp in the status bar updates much less frequently with many assets. What triggers an update of this timestamp?

3. How exactly does Zorro build these daily candles with BarOffsets? Does it collect live data in some interval and then use this data to construct the candle when it closes?

Re: run() delayed with IB and many assets [Re: MegaTanker] #485766
04/20/22 14:10
04/20/22 14:10
Joined: Jul 2000
Posts: 28,044
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,044
Frankfurt
Price requests from IB can be up to 10 seconds. And prices are updated immediately before the run function, so with several 100 assets you can indeed get a 10 minutes delay.

Price requests are much faster when you activate the 'fast' price type - see https://zorro-project.com/manual/en/brokercommand.htm. Otherwise, when your trading is time critical, set BarOffset accordingly earlier.

Zorro builds daily candles in the way you described. In your case they are collected every 10 minutes.

Re: run() delayed with IB and many assets [Re: MegaTanker] #485768
04/20/22 14:33
04/20/22 14:33
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
I see, thank you. The 'fast' mode makes the delay bearable, cuts it down to around a minute delay with 60 assets.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1