SmartQuant Discussion
http://www.smartquant.com/forums/

code to get current broker orders
http://www.smartquant.com/forums/viewtopic.php?f=44&t=7974
Page 1 of 1

Author:  scrubolio [ Fri Mar 26, 2010 9:06 pm ]
Post subject:  code to get current broker orders

I know the code to get current broker positions is:

Code:
BrokerAccount IB = DataManager.GetBrokerInfo("IB").Accounts[0];
      foreach (BrokerPosition brokerPosition in IB.Positions)
      {
            //do something here with each position
         }
      }


but is there code that returns currently open positions that HAVE NOT been filled and are just open orders?

Thanks in advance.

Author:  ivb73077 [ Tue Aug 13, 2013 9:33 pm ]
Post subject:  Re: code to get current broker orders

Hello,

I am having the same problem. I have one position and two open (unfilled) orders. I am using:

Code:
BrokerInfo info = DataManager.GetBrokerInfo("IB");
      BrokerAccount account = info.Accounts[0];



I can readily sync positions to the broker (IB) because the account.Positions.Count value is 1 (as it should be). However, I do not see orders: the account.Orders.Count value is 0, despite the fact that it should be 2.

Can anyone please advise? Thank you.

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/