Hi folks,
I have a dilemma when trading into an InteractiveBrokers Advisor account (from the Portfolio Trader), using the "Manual allocation" method to trade into a Profile.
In this scenario, StrategyInfo.MarketPositionAtBroker always returns zero.
When using the override method OnBrokerPositionChange(), I can see that it can correctly declare the actual number of contracts filled in all the sub-accounts, however this method gets called multiple times and the values change each time, so it isn't reliable.
Is there a flag or a state I can examine to know this one "true" call to OnBrokerPositionChange()?
Any other advice to assist getting some kind of meaningful position at the broker in this scenario?
BTW the MoneyManagement script at the PortfolioTrader also gets zero for MarketPositionAtBroker.
This problem is also displayed in the Order and Position Tracker window.
In the OpenPositions tab, the sub accounts show correctly the fills in each. Yet in the StrategyPositions tab, all the strategies show zero as the BrokerPosition.
many thanks,
saltminer
MarketPositionAtBroker InteractiveBrokers Advisor FA account
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: MarketPositionAtBroker InteractiveBrokers Advisor FA acc
Hello saltminer,
You can utilize OnBrokerStategyOrderFilled to know this exact strategy triggered the OnBrokerPositionChange.
You can utilize OnBrokerStategyOrderFilled to know this exact strategy triggered the OnBrokerPositionChange.