Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 22:03:47 +0000



Post From: sc.GetTradePositionForSymbolAndAccount

[2016-10-06 18:31:51]
User577170 - Posts: 8
I'm in the midst of formatting an automated trading strategy. As many times the SC functions to open and close orders dont return proper values due to issues with the IB interface, a SC function sc.GetTradePositionForSymbolAndAccount is used to check for any open positions.

This function does not distinguish from which chart/strategy the position is opened. So if you try to run the strategy on same symbol from multiple chartbooks, sc.GetTradePositionForSymbolAndAccount, will provide status of combined position from the two chartbooks resulting in not being able to open more positions within the same symbol.

Is there a function I can use that would allow for multiple positions of the same symbol to be opened simultaneously? Or would removing sc.GetTradePositionForSymbolAndAccount work for this issue?