Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by Emre
Today at 01:03
New Zorro version 1.83
by claudio
Yesterday at 17:22
Ahead bias when retrain
by jcl
Yesterday at 12:27
Huge array for Deep Learning
by jcl
Yesterday at 12:06
[LBGUI] Memory not released!
by EVO
05/23/18 22:39
http_post undeclared identifier
by Superku
05/23/18 22:10
Pan/Tilt in relation to entity?
by Superku
05/23/18 20:59
AUM Magazine
Latest Screens
Lake scene
Forgotten Tales - Demo version
RPG PARTY
Triton Wing now available on Steam
Who's Online
9 registered (Slin, Quad, Superku, AndrewAMD, 3run, jyd, mk_1, 2 invisible), 464 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Rayharry, AgentShark, rpauletto, tuuPaul, LaserJock2000
17960 Registered Users
Topic Options
Rate This Topic
#472529 - 05/03/18 10:50 Push-based broker plugins
Veratyr Offline
Member

Registered: 01/08/16
Posts: 117
I've been testing the multi-broker beta with recording tick data for a few brokers and assets and I've found that Zorro frequently can't keep up with all the data.

My guess is that this is because Zorro is polling every broker for every asset.

At the moment my only option seems to be decreasing tick resolution (and hence increasing latency).

I think it'd be better if instead of polling for prices, broker plugins could push them. An API something like BrokerAsset(char* asset, FARPROC fpAsset) that the plugin can call when it gets a price update.

Top
#472535 - 05/03/18 15:28 Re: Push-based broker plugins [Re: Veratyr]
Zheka Offline
Member

Registered: 07/03/17
Posts: 294
http://zorro-project.com/manual/en/ticktime.htm

AFAIK, the default Zorro price update request interval is 100ms.
Set TickTime to 10-20 to get nearly all the ticks.

Setting TickTime=1 will most probably bear significant overhead and will indeed slow things up.



Edited by Zheka (05/03/18 15:35)

Top
#472562 - 05/05/18 00:24 Re: Push-based broker plugins [Re: Zheka]
Veratyr Offline
Member

Registered: 01/08/16
Posts: 117
Yeah, I'm aware. The problem is that polling starts to choke pretty quickly when you've got a few brokers and when you're looking at arbitrage, a delay of 10ms is huge.

I suspect most of my problem is caused by the MT4 broker plugin itself though. I'm trying to write a FIX plugin to get around that. It should bring the BrokerAsset call down to no more time than copying a double from RAM.

Top
#472572 - 05/05/18 17:09 Re: Push-based broker plugins [Re: Veratyr]
Zheka Offline
Member

Registered: 07/03/17
Posts: 294

1) I might be wrong, but looking through the MT4 mql file . From what I can tell, it should actually trigger on any tick, OR on a timer (which you can change in the header). It might be that TickTime has nearly no influence on an MT4 plugin...but I might be wrong.

2) Even if it does, it's not really a 10ms delay. 10ms rather a max delay.

3) You can run a Zorro instance per broker connection to split the load (so that each Zorro occupies one CPU core) and exchange data via a global variable (https://fx1.net/sharedvar.php or implement this yourself).

4) I think the whole exercise is futile: theoretical arbitrage opportunities might exist if you trade vs. an pure MM MT4 server, but most serious brokers are STP and use more or less the same LPs. You might indeed observe a worthy price difference in MT4 but you will not be able to get filled at such prices.
MT4 introduces a significant overhead, getting to FIX makes you compete with FPGAs.

Top
#472574 - 05/05/18 20:09 Re: Push-based broker plugins [Re: Zheka]
Veratyr Offline
Member

Registered: 01/08/16
Posts: 117
1) I did a pretty basic test and whatever's going on, it's not good enough. I sat Zorro next to MT4 and just watched the quotes. Zorro at times sat still for several hundred milliseconds while I watched MT4 tick over repeatedly.

2) No, it's a minimum delay. Per http://zorro-trader.com/manual/en/tick.htm:

Quote:
The minimum time between two tick calls can be set up with TickTime. If a new quote arrives earlier, it is delayed until the TickTime is over.


3) Sure but if I'm writing extensive logic outside Zorro, there's little point using Zorro. Broker arbitrage doesn't require a whole lot of complex logic.

4) Theoretically, if a broker is STP and using the same LPs, yes, this is true. However I think brokers do a lot of order matching between their own clients, so it's not entirely STP.

I've already been recording FIX data across a few brokers and there are definitely opportunities there. These brokers are too small for the folks with serious resources like FPGAs and ASICs to deal with.

Top



Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de