alrts
unread,Jul 12, 2011, 8:08:35 AM7/12/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jbook...@googlegroups.com
Hi all,
I know now why I had no trades.
It's because I have a multiaccount. In order to enable JBookTrader for multiaccounts, there are only very small modifications necessary, as follows:
TraderAssistant.java: In method placeMarketOrder(), you have to add the following line just before placeOrder(...):
order.m_account = accountCode;
TraderAssistant.java: In method checkAccountType(), you have to replace the following lines
socket.reqAccountUpdates(true, "");
...
socket.reqAccountUpdates(false, "");
by
socket.reqAccountUpdates(true, accountCode);
...
socket.reqAccountUpdates(false, accountCode);
This is a very simple modification just to make JBookTrader runnable with multiaccounts. Trading takes place with the first subaccount of the multiaccount (not the master account). In order to access other subaccounts of the multiaccount, further modifications would be necessary.
I think with these modifications, JBookTrader is still functoning with singe accounts, but I cannot test this, as I have no single account and IB does not allow me to open a second account.
Could someone implement these modifications and test it with a single account? Thank you!
Alexander
PS: Sorry for this delay. I was moving and out of the office for 2 months