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
5 registered members (AndrewAMD, monk12, TipmyPip, Quad, aliswee), 1,029 guests, and 6 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
Page 2 of 5 1 2 3 4 5
Re: IB Plugin needs a fix [Re: Zheka] #468530
10/09/17 10:25
10/09/17 10:25
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Yes, it can be changed, but all this was tested with the IB API. The 300 ticks have been most effective. What matters for speed is the total number of prices that you download, not the number of ticks per call.

Re: IB Plugin needs a fix [Re: jcl] #468532
10/09/17 12:45
10/09/17 12:45
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Is 300 ticks an internal Zorro limitation (of saving to *.t8 structs) or is it specific/has grown from IB API's?

MC requests data in 1-day chunks(=1440 1min ticks) - which is in line with IB APIs recommendation and works well in practice. While Zorro makes 5 requests where 1 is really needed (Zorro also requests data in "36000s" (=600 tick) chunks but only processes 300).

This limitation might also be not optimal for other broker's APIs. Let's give Broker plug-in writers more freedom!

Quote:
What matters for speed is the total number of prices that you download, not the number of ticks per call.

Say, we need to download 6 days (=8640 of 1min bars).
Zorro requests 2 types of data - Ask and Trade(should be Bid - to calculate spread?).
8640/300= 29 *2 sides=58 requests - which causes(because there are also other requests) a "pacing violation" of IB API.

Re: IB Plugin needs a fix [Re: Zheka] #468533
10/09/17 13:31
10/09/17 13:31
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
300 ticks is the optimal size for most APIs, only a few need smaller sizes. This has something to with TCP/IP packets. Internet routers are most effective with packets below 5000 bytes, as normally generated by 300 ticks requests.

I do not know the IB data types, but you need the ask price and the volume for historical data, and that's what is requested.

And if you really get a "pacing violation" error, just contact support and describe how you did that. They'll look into it.

Re: IB Plugin needs a fix [Re: jcl] #468535
10/09/17 14:03
10/09/17 14:03
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
IB API sends volume through "TRADES" tick type - which is not available for FX at IB. Zorro's historical data request for "TRADES" (to obtain volume) generates errors.

TCP/IP tuning is definitely important for minimizing latency in RT trading, but much less so for downloading historical data.

Anyway, if you lift the limitation on Zorro's side, your IB plugin can still request data in 300 ticks.
But other people will be able to use it with more flexibility in their own implementations.

Re: IB Plugin needs a fix [Re: Zheka] #468536
10/09/17 14:17
10/09/17 14:17
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I reckon that it returns an error code when requested data is not available for a certain asset, but that should not be harmful.

And if you want to write a plugin and request 2000 ticks data, we'll certainly lift that limitation for you. Plugin authors get from us almost anything.

Re: IB Plugin needs a fix [Re: jcl] #468543
10/09/17 15:31
10/09/17 15:31
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
What takes MC <1min, takes Zorro forever. There must be reasons, and comparing logs give a hint.

I do not have time now to write a plug-in from scratch - I have no experience writing them in full; it would take me longer. It is surely easier to improve current code, than re-invent the wheel.

But AndrewAMD - author of AllyInvest plug-in - also asked to lift the limit.

Also: if we change from requesting Trades to Bid, we can fill in the actual Spread in historical data.

Re: IB Plugin needs a fix [Re: Zheka] #468544
10/09/17 15:48
10/09/17 15:48
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Originally Posted By: Zheka
But AndrewAMD - author of AllyInvest plug-in - also asked to lift the limit.
I will formally request it after I run a couple of API tests.

This feature would probably benefit me more than other plugin writers, though. For example, it might not benefit the IB plugin.

Re: IB Plugin needs a fix [Re: AndrewAMD] #468547
10/09/17 16:46
10/09/17 16:46
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Ok. We'll lift that limit for the next release after 1.70.

Re: IB Plugin needs a fix [Re: jcl] #468552
10/09/17 17:34
10/09/17 17:34
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Great!

What about requesting Bids to fill in actual spread values in historical data?

Re: IB Plugin needs a fix [Re: Zheka] #468574
10/10/17 17:03
10/10/17 17:03
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Jcl,
getting further into how IB Plugin currently works, I found that it actually requests data snapshots every 500ms. Is this by design? This guarantees significant differences between historical and live data.
IB streams data in 250ms snapshot at worst, and in 5ms snapshots for FX(if there is quote).
Can Zorro actually process all ticks, if fed by a plug-in?

Page 2 of 5 1 2 3 4 5

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