Login Page - Create Account

Support Board


Date/Time: Sun, 05 May 2024 21:26:24 +0000



sc.GetTradePositionForSymbolAndAccount

View Count: 752

[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?
[2016-10-07 04:24:06]
Sierra Chart Engineering - Posts: 104368
If there is any incorrectly reported or not reported Trade Positions from Interactive Brokers, Interactive Brokers needs to resolve that.

There is a common Trade Position quantity maintained for a Symbol and Trade Account which is independent of charts.

To use different instances of automated trading systems on the same Symbol, requires using different accounts for each system. This is explained here:
Automated Trading Management: Using Multiple Automated Trading Systems at the Same Time
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2016-10-07 18:35:33]
User577170 - Posts: 8
I have 6 different trade accounts for Interactive Brokers. All with separate log in information.

The Trade Account that an automated trading system uses is based upon the Trade Account selected on the Trade Window for the chart the trading system is applied to. Refer toSelecting Trade Account for instructions to change the Trade Account the automated trading system will use.

When I open a new instance, I'm lost on where to add the new trade account. I don't see the necessary Username or Password that would allow me to link a new trade account.

Thanks for clarifying.
[2016-10-08 00:59:58]
Sierra Chart Engineering - Posts: 104368
Sierra Chart receives the accounts from Trader Workstation when it connects. You just need to select it:
Basic Trading and the Trade Window: Main/C >> Trade Account (Selecting Trade Account for Chart / Trade DOM)

Here is the documentation for using multiple TWS instances:
Interactive Brokers Trading Service: Running Multiple TWS Instances
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account