Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Edgar_Herrera, VoroneTZ, Akow), 973 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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