RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        


««12

Account info of Interactive Broker plugin... Expand / Collapse
Message
Posted 5/12/2011 00:41:21 Post #13185
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
dwebber (5/5/2011)
As a further update, I resolved the issue above via a separate dll that includes a singleton. Kvps from UpdateAccountValueEventArgs in the TWSPlugin are saved in the singleton and retrieved in the strategy.

A few minor issues are still outstanding such as:

1. the fact that the IB account values are not updated until after positions change in the account (causing values to be missing upon startup), and
2. not being able to update account values for each account in an FA account (the IB api is only sending updates for the last account requested).


I think you can resolve these issues by having the singleton have a reference back to the TWS plugin instance. Then you can call a method on the singleton to have the TWS plugin request account updates, and probably also to specify which account you want the values for.

Thanks,
Daniel
Posted 5/12/2011 10:26:34 Post #13186
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
Issue #2 above appears to be resolvable by calling client.RequestUpdates at each point an update is need, e.g., after an order status has been updated in client_OrderStatus.

Regarding the 1st issue: Currently, Startup is called before setting bool brokerConnect = true in TWSPlugin.Connect(). Can the broker be connected before Startup is called in order to obtain account variables in which the system is dependent upon, e.g., available cash? Without connecting to the broker first, a call to client.RequestAccountUpdates will not trigger updates.

Thanks, Duane
Posted 5/13/2011 00:39:22 Post #13190
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
When you start a live system, the broker used is the paper broker until the lead bars finish and switch to live mode. We might consider changing this, but not for RE 2010. Can you have your system wait until the account variables come in before enabling trading?

Thanks,
Daniel
Posted 5/13/2011 13:26:50 Post #13193
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
I was able to resolve the issue through a combination of delayed order processing and checks in the script. I appreciate your support.

Duane
« Prev Topic | Next Topic »

««12

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 2:29pm

2005-2007 © RightEdge Systems