Gamestudio Links
Zorro Links
Newest Posts
Old models with Mixamo animations
by rayp
Yesterday at 21:21
rayp's old school fast zombie FPS project
by rayp
Yesterday at 21:10
Votes for future features
by AndrewAMD
Yesterday at 18:08
Series within loop
by tradingest
Yesterday at 15:24
TMF info
by AndrewAMD
Yesterday at 15:24
text outline breiter machen?
by tagimbul
Yesterday at 12:26
Reset vars
by tradingest
Yesterday at 00:40
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
5 registered (Akow, RealSerious3D, AndrewAMD, thewalruss, 1 invisible), 442 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
jiffdbf, jgtrader, Chefmac, BazGen, pallab1964
18079 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: 121
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
Senior Member

Registered: 07/03/17
Posts: 326
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: 121
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
Senior Member

Registered: 07/03/17
Posts: 326

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: 121
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
#473388 - 07/02/18 16:40 Re: Push-based broker plugins [Re: Veratyr]
AndrewAMD Online
Senior Member

Registered: 02/21/17
Posts: 384
Loc: Chicago
It seems Zorro can now receive every tick - as long as it's supported by the respective broker plugin.

Here is the new Zorro Broker API feature, now in beta:

Quote:
For asynchronously triggering a price quote request, send a WM_APP+1 message to the window handle received by the SET_HWND command. For triggering the callback function, send a WM_APP+2 message. This can be used for prices streamed by another thread. An example for sending messages can be found under HWnd.
Further reading:
http://zorro-project.com/manual/en/hwnd.htm
http://zorro-project.com/manual/en/brokerplugin.htm
http://zorro-project.com/manual/en/brokercommand.htm
http://zorro-project.com/manual/en/tick.htm
https://msdn.microsoft.com/en-us/library/windows/desktop/ms644944(v=vs.85).aspx

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