Author |
Topic: Allocation Blocks Account, Position Volume is always 0, no P/L, etc. (6 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
CWeber984 Posts: 226 Joined: Apr 24, 2012 |
If I understand correctly, an account configured as an Allocation Block (AB) manager allows for management of orders/positions for several accounts. The manager creates an AB for selected accounts, and then, with that AB selected, CRUDs orders/positions for those accounts.
The AB manager account has an Average Positions List, just like a simple account. The AB account's positions list contains the positions the manager account has placed, both for open and closed positions. However, my testing shows that each of the AB manager account's open positions always show a Volume of 0 and other empty attributes that are important for position management. Volume and price info can be found in the fills for the position, but not in the position's data members themselves, unlike regular accounts. I've tested this within the C++ COM and Advanced NET examples: - Logged into the AB Manager account - checked open positions lists - both examples simply acquire the positions from the first account that the AB manager account has listed that it is managing. Thus, the open positions lists in the samples are not for the AB account at all. - In the Demo, I select a given AB in accounts, and then in the open positions list the account manager's open positions for that AB appear with the correct volume (net position), ave buy price, open p/l, etc. Given that the examples don't show the AB's positions at all, could you explain how you manage the orders and positions for an AB in the trader demo? I would like to be able to CRUD a selected block's open position as if it were one order, but without price, volume info, etc., I can't perform CRUD operations: - Looping over the fills of that position to aggregate the needed info is a possibility. - Might it be future work that the AB manager account's open positions will someday contain that price, vol, etc. data, aggregated for users of the api that wish to exercise the AB feature and functionality? - You do a nice job of managing AB positions within the Demo; can you advise as to how an API user might achieve a similar result? Thanks, CHW |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
AB account (or "wash" account) doesn't maintain positions and balances: user can have several allocation blocks with different accounts that handled by the same wash account. OEC Trader uses own logic to merge positions of allocation block's accounts. OECAPI provides only merged balances via http://www.openecry.com/api/api/html/P_OEC_API_AllocationBlock_TotalBalance.htm
Victor Vins Lead Software Developer |
||||
CWeber984 Posts: 226 Joined: Apr 24, 2012 |
- Would it be possible for the api to be extended to have the wash account data members populated as they would be for a normal account?
- The positions in that wash account's Average Positions List do exist, but do not have their price, p/l, etc, populated. Could these positions have their prices, p/l, etc, be populated and available via api? - Same thing for the wash account orders, whose state changes are being reported in OnOrderStateChanged callback, but again, without price, etc. members populated. Could they be populated in the api? It would help api users of the AB account feature tremendously to have that account functionality available. I will also post this as a feature request. Thanks, CHW |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
Since wash account can be shared between different allocation blocks, it is impossible for us to add common logic for maintaining positions for wash accounts. Moreover, risk settings would be treated incorrectly: customer is not obligated to close positions of wash accounts since these position are artificial ones. We are considering to add positions to AllocationBlock class to be consistent with its TotalBalance property.
About OnOrderStateChanged: could you please provide more details what members are not populated? Victor Vins Lead Software Developer |
||||
CWeber984 Posts: 226 Joined: Apr 24, 2012 |
Thanks for your prompt followup to my previous post.
I did some more research into the api using our app and your samples and must correct my previous assertion re. orders when using a wash account: - I believe all the required data members are being populated for orders with the wash account id. I compared the fields to orders placed from a regular account - However, there are missing fields in the COM version of the API: - ABChildren and ABParent, which could be useful. - I verified that they do exist in the NET version of the api. It is definitely a great consideration to add AvePositionsList to each AllocationBlock, and I look forward to the decision that will be made. I'll be looking into how to make positions work tomorrow. Thanks again, CHW |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
We have placed it to development queue. ABChildren and ABParent will be added as soon as possible, AvgPositionList will take some time.
Victor Vins Lead Software Developer |
||||