Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 20:24:01 +0000



Has something changes with respect to multiple Sierra Chart connections to IB TWS?

View Count: 1518

[2015-01-19 03:05:30]
Agent Orange - Posts: 36
Hi, I have been using Sierra Chart with IB for years, and as recently as last week I was able to connect two instances of Sierra Chart to TWS simultaneously. However, when I try to do this this evening, only one of the Sierra Chart will connect. The second attempt to connect just says "Connecting...", but never does connect. I get no error messages from either Sierra Chart or TWS.

I am currently using Sierra chart 1224 with TWS 948.3c.
I have changed nothing in my set up between the time this was working and now.
Has there been a policy change at Sierra Chart on this? Or has there been a policy change at IB that you're aware of?
Any help would be greatly appreciated.

Thanks in advance.
[2015-01-19 03:28:48]
Sierra Chart Engineering - Posts: 104368
There are no restrictions on the Sierra Chart side.
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
[2015-01-20 16:14:58]
Agent Orange - Posts: 36
I have an update on this issue. I would say based on the evidence I have now gathered, it's unclear whether this issue arose due to a change at IB or a change at Sierra Chart. What I can say with certainty is that this was not an issue as of last week. I have been connecting 2 instances of Sierra Chart to TWS for years with no problem, but when I tried to do this on the evening of Sunday 1/18/2015, it no longer worked. I would add that regardless of what changes caused this issue, it may require cooperation between Sierra Chart support and IB support to resolve it.

I contacted IB support, and they had me enable API logging, and when I attempted to connect a second instance of Sierra Chart to TWS I found the relevant error message to be:

"22:02:12:888 -> 4-2--1-2101-Unable subscribe to account as the following clients are subscribed to a different account.{9368395}-"

(The first instance of Sierra Chart was already connected to TWS with client ID 9368395, and I was attempting to connect the second instance as 9368396.

They also had me connect two instances of their own Java test client using two different client IDs, and, of course, that worked fine, and they interpret that to mean that the problem is with Sierra Chart rather than TWS. I still think it's possible IB changed something on their servers, but I have no way to investigate beyond what I've described below.

--------------------

From examining the log files, I now have a guess at what is going on. My account at IB is actually two accounts (call them account #1 and account #2) which are linked (which is to say, I log in to the first account and have access to both accounts). It appears that when the first instance of Sierra Chart connects, it requests account information for each of the two accounts, first by subscribing to account #1 for account data, then unsubscribing, then subscribing to the account data for account #2. My guess is that when the second instance of Sierra Chart attempts to connect, it tries to subscribe to account data for account #1, and this fails because the first instance is still subscribed to the account data for account #2. But as I said, this is only a guess based on what I can see in the log files.

As I place my trades through code I wrote myself in Java, the only reason I connect 2 instances of Sierra Chart to TWS is so I can monitor the markets from my laptop from other parts of my home when I am not at my trading machine. So if my guess about what is going on is correct, I could work around the problem if there is a way to tell Sierra Chart not to request my account info when connecting to TWS. Is this possible to accomplish through some settings of Sierra Chart? This would not actually fix the problem for other users, but I suspect this problem may not be affecting very many as it only occurs when attempting to connect multiple Sierra Charts instances to TWS with linked IB accounts.

I apologize for the complication of all this and the possibility that this issue was caused by a change at IB; my prior experiences with Sierra Chart support (I've been a VERY happy customer of Sierra Chart for many years) and IB support suggest that you guys are the ones who are most likely to figure it out regardless of who caused it.





[2015-01-20 18:05:32]
Sierra Chart Engineering - Posts: 104368
Provide a copy of the Message Log, by following these instructions:
http://www.sierrachart.com/index.php?l=PostingInformation.php#log
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
[2015-01-20 18:57:26]
Agent Orange - Posts: 36
OK, I just sent the two log files. The first one is for the first instance of Sierra Chart, which properly connects to IB TWS.
The second log file shows the failure of attempting to connect a second instance of Sierra Chart.

To make this example as clean as possible, I did two fresh installs of SC 1224 to two new directories and those are what I used to make these connections to IB TWS.


[2015-01-20 19:31:04]
Sierra Chart Engineering - Posts: 104368
As you already noted, this is the relevant problem:

Message from IB: Unable subscribe to account as the following clients are subscribed to a different account.{9368400}. IB Error Code: 2101. Request ID: -1. | 2015-01-20 18:50:36

The question is why does it matter if another client with a different client ID is subscribing to a different account. This is not making any sense.

The problem with this is we do not know exactly what to do to solve this and what we might do to solve it will create other problems. The solution is going to be with Interactive Brokers.

IB has definitely changed something and they need to explain this error and why it is now occurring when it did not occur.
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
[2015-01-20 19:48:40]
Sierra Chart Engineering - Posts: 104368
Thinking about this some more, we know how to solve it and we will do that in the next release. A new release should be out in about two days.

So no need to spend further time on this with Interactive Brokers.


Although Interactive Brokers should answer the question that we presented.
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
[2015-01-20 20:32:39]
Agent Orange - Posts: 36
"Although Interactive Brokers should answer the question that we presented."

Does this mean you have or will present it to them? (I hope so as they are likely to take you more seriously than they take me.)

"Thinking about this some more, we know how to solve it and we will do that in the next release. A new release should be out in about two days. So no need to spend further time on this with Interactive Brokers."

I figured it was probably IB, but I knew you'd have a better chance of convincing them of that, and I also figured you might be able to work around their change (which is certainly the most expedient solution). I've said this before, but it bears repeating: I've got over 30 years of experience with systems programming, and you guys are a standout when it comes to responsively supporting your product and taking issues seriously. I've always taken pride of ownership in my code, and I really appreciate that you guys do too.

Your product is fantastic and so is your support.
Keep up the good work.
[2015-01-20 20:40:10]
Sierra Chart Engineering - Posts: 104368
Thank you for the comments.

We could ask Interactive Brokers the question, but we will let it go for now.

And in any case, Sierra Chart does start account updates for each of the accounts, so if this is now conflicting with multiple connections this will create some problems. But we will deal with it later. As long as you are not trading from the second connection it should be OK.
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
Date Time Of Last Edit: 2016-06-07 17:04:33
[2016-06-07 16:27:01]
User48122 - Posts: 7
I have similar problem. My two IB accounts are linked and SC is constantly disconnecting. The message I get is: "Message from IB: Unable subscribe to account as the following clients are subscribed to a different account.{1}. IB Error Code: 2101".

There are no trade positions (actually one of the accounts U120* has zero funds). Somehow SC times out while waiting for a trade position.

What also puzzles me is that according to the message log, there is a request for data updates of expired futures (like TF-201412-NYBOT or ES-201412-GLOBEX), which do not exist in any of my charts. See attachment.

I would appreciate your help
Private File
[2016-06-07 17:11:14]
Sierra Chart Engineering - Posts: 104368
We added the timeout condition to solve a problem where TWS does not respond to a request for Trade Position data updates. But we can remove this. Just yet another example of a problem with Interactive Brokers.

Regarding the expired symbols, refer to:
https://www.sierrachart.com/index.php?page=doc/doc_ChartDataFiles.html#CleaningUpOldSymbols
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
Date Time Of Last Edit: 2016-06-07 17:23:21
[2016-06-07 17:23:55]
Sierra Chart Engineering - Posts: 104368
So the timeout check for Positions will be removed in the next release coming out today or tomorrow.
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-06-08 01:58:42]
User48122 - Posts: 7
Thank you kindly.

I found some old unused symbols in Global settings>>Intraday File Update List and removed them promptly.

So, the issue of disconnection due to the timeout check for Positions will be addressed shortly with the next release, which is great.

What about the problem with linked accounts: "Message from IB: Unable subscribe to account as the following clients are subscribed to a different account.{1}. IB Error Code: 2101"? Is there a way to specify which IB account to be used or ignored somewhere in Data/Trade Service Settings?
Date Time Of Last Edit: 2016-06-08 02:02:03
Private File
[2016-06-08 05:31:27]
Sierra Chart Engineering - Posts: 104368
We have released the change to solve this. Update with Help >> Download Prerelease. Follow the instructions here:
https://www.sierrachart.com/index.php?page=doc/download.php#FastUpdate

Is there a way to specify which IB account to be used or ignored somewhere in Data/Trade Service Settings?
No, there is not and that particular message from Interactive Brokers makes no logical sense. You really have to ask them for help with this.
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
Date Time Of Last Edit: 2016-06-08 05:32:00
[2016-06-10 01:55:53]
User48122 - Posts: 7
In relation to "Message from IB: Unable subscribe to account as the following clients are subscribed to a different account.{1}. IB Error Code: 2101", I got the following reply from IB:

"In regards to error message "Unable subscribe to account as the following clients are subscribed to a different account.{1}. IB Error Code: 2101", this is actually a limitation of the API function reqAccountUpdat es() in requesting account data. The limitation is that you can only subscribe to account update to one account at a time. If you need to subscribe to a different account, you would need to cancel the subscription for the first account and then subscribe to the second account.

In your situation, I guess you have two API clients connecting to the same TWS with two different client Ids. You were using client Id = 1 to request account update for one of your account, and you receive the error message when trying to request account update for the other account with the other client Id. You would need to cancel the first account subscription first in order to make your second subscription."

Should I change the Instance Client ID in SC Data/Trade Service Settings from 9368395 to 1 and my problem will go away? I don't know how this could work, since TWS would not be able to differentiate between two clients? Or do they mean that I can not have more than one client connected to TWS at a time?
[2016-06-10 20:34:55]
Sierra Chart Engineering - Posts: 104368
OK we understand this. This is one of the major problems with Trader Workstation.

Sierra Chart does handle this properly when you have multiple trading accounts on the Trader Workstation you are connecting Sierra Chart to. It does not make a permanent subscription for Trade Position data to any of the accounts. Only temporarily as needed like when there is an order fill.

It is the other program you are using which is the cause of this problem. If you disconnect that program this issue will go away.
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
Date Time Of Last Edit: 2016-06-10 20:35:40

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

Login

Login Page - Create Account