Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, AndrewAMD), 877 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Broker plugin API for multiple accounts #472582
05/06/18 16:58
05/06/18 16:58
Joined: Jan 2016
Posts: 122
V
Veratyr Offline OP
Member
Veratyr  Offline OP
Member
V

Joined: Jan 2016
Posts: 122
I'm working on a plugin that connects to multiple accounts and most of the data receiving infrastructure is there, the problem I'm having right now is with how Zorro requests assets for multiple accounts.

The docs say about BrokerAccount:

Quote:
Returns the current account status, or changes the account if multiple accounts are supported. Called repeatedly during the trading session.


And about BrokerLogin's Account parameter:

Quote:
Optional output, char[1024] array to be filled with all user's account numbers as subsequent zero-terminated strings, ending with "" for the last string. Only the first account number is used by Zorro.


So my assumption was that I simply configure "Account" in Accounts.csv and return it in the Accounts output in BrokerLogin, then every time Zorro requests an Asset it calls BrokerAccount.

This seems to be incorrect though. When I have assets on multiple accounts, I see Zorro just call BrokerAsset over and over again with the same Asset argument and nothing in between. No BrokerLogin, no BrokerAccount, just repeating requests for the same asset, once per account.

Is this expected behaviour? Should my broker plugin force users to prefix their asset names with a prefix or something like that?

Re: Broker plugin API for multiple accounts [Re: Veratyr] #472596
05/07/18 14:58
05/07/18 14:58
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
I believe the design intent was for the same Assets to be accessible from all accounts, so there would be no reason to change accounts between BrokerAsset calls.

Re: Broker plugin API for multiple accounts [Re: AndrewAMD] #472597
05/07/18 15:03
05/07/18 15:03
Joined: Jan 2016
Posts: 122
V
Veratyr Offline OP
Member
Veratyr  Offline OP
Member
V

Joined: Jan 2016
Posts: 122
Ah, so I will have to give all my assets different names... Oh well, it works.


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