SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Tue Sep 17, 2019 10:23 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Thu Apr 04, 2013 11:40 pm 
Offline

Joined: Fri Nov 30, 2012 11:16 pm
Posts: 10
Hi,

I have two accounts with IB - a main one and a linked one. I am using single TWS and a single username/password. I am using OpenQuant and Amibroker to send orders through API to both of them. I would like OpenQuant to send orders to the main account but it is sending them to a linked one. I chose main account ID in MonitoredAccount drop down menu. When I place orders manually from Quotes window of OpenQuant it goes to the correct account. But orders sent from strategy end up at the wrong account. What am I doing wrong? Reached IB support - they are saying that as long as client is sending correct AccountID with API order it should go to the right account. Any advise is appreciated!

Thanks!


Top
 Profile  
 
PostPosted: Fri Apr 05, 2013 4:50 am 
Offline

Joined: Fri Nov 30, 2012 11:16 pm
Posts: 10
Looked more through the forum and found following advise on similar problem:

"It seems that your IB account is not of FA type.
In this case, you may route orders to different accounts by setting order.Account property.
Or, set the Account property of IB plugin (default route)."

Where do I set Account property of IB plugin?

Thanks!


Top
 Profile  
 
PostPosted: Fri Apr 05, 2013 5:20 am 
Offline

Joined: Fri Nov 30, 2012 11:16 pm
Posts: 10
I tried to use "order.Account" to specify account to use - did not work the order still went to the linked account.

MyBuyOrder = MarketOrder (OrderSide.Buy, Size);
MyBuyOrder.Account = "U12345678";
MyBuyOrder.Send ();

Also I noticed that when I connect to IB from OQ it gives an error: Unable subscribe to account as the following clients are subscribed to a different account.


Top
 Profile  
 
PostPosted: Fri Apr 05, 2013 2:01 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Hi,

Is your IB account of FA type or not?

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Fri Apr 05, 2013 4:25 pm 
Offline

Joined: Fri Nov 30, 2012 11:16 pm
Posts: 10
No it is not FA account.


Top
 Profile  
 
PostPosted: Fri Apr 05, 2013 5:28 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Hi,

It seems I was wrong - Order.Account is used only in a case of FA account type.

But, there is no difference between sending order from the strategy and from the order blotter (manually)

Also, is AmiBroker connected to TWS at the same time? May be, it can affect the common configuration of TWS.

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Fri Apr 05, 2013 6:02 pm 
Offline

Joined: Fri Nov 30, 2012 11:16 pm
Posts: 10
Yes that happens when Amibroker is connected first. If OpenQuant is connected to TWS first then it can send orders to main account just fine. But then Amibroker can not send orders to the linked account and they end up at the main one. Might be that TWS does not allow two different clients to send API orders to two different accounts. May be it needs FA account type for that or smth. I will try to create separate username/password and open second TWS. Then will point each client to a separate TWS and will see if that will work.


Top
 Profile  
 
PostPosted: Mon Nov 04, 2013 9:22 pm 
Offline

Joined: Tue Oct 13, 2009 12:19 pm
Posts: 257
Dear all,

I seem to have a similar issue. I have a TWS which has two accounts, one is a custody account with IB (Uxxxxxx) and the second is a clearing only account (UGxxxxxx). I cannot get OQ to send orders to the clearing account (UG) and therefore cannot trade with it. When I look into the TWS audit trail, it seems like, the orders get send to the U account.

When I go into BrokerInfo I cannot see any information on the U account but I see the UG account info perfectly.
In the IB properties, I have set the MonitoredAccount to the UG account - still does not make a difference.

Support team, what can I send you so that you can pinpoint the issue? Should I create the IB API logs for you to look into it?

Regards
Mike


Top
 Profile  
 
PostPosted: Tue Nov 05, 2013 12:36 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Hi Mike,

Could you set up IB logger with the following settings,
next, connect provider, change MonitoredAccount to Uxxxx value
and try to get broker info?
Next, please find ib-yyyyMMdd.txt file under <%appdata%>\SmartQuant Ltd\OpenQuant\Framework\logs
directory and send me it via email directly.


Attachments:
ib_logger.png
ib_logger.png [ 33.23 KiB | Viewed 7456 times ]

_________________
SmartQuant Development Team
Top
 Profile  
 
PostPosted: Tue Nov 05, 2013 1:33 pm 
Offline

Joined: Tue Oct 13, 2009 12:19 pm
Posts: 257
I tried to send you the details via PM, but they got are stuck in the Outbox. Can you check that? Or provide me your email and I will forward them then.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group