Login Page - Create Account

Support Board


Date/Time: Wed, 05 Mar 2025 04:07:01 +0000



SC showing positions that were closed with other SW

View Count: 646

[2022-01-10 08:28:01]
User405165 - Posts: 5
Good day folks, tried to search to forums for this but I had no luck in resolving it.

I use TWS and both SC and Jigsaw connects to the same instance.

If I execute trades on SC it shows up correctly on both charts and in the trade window - and in Jigsaw.
If I execute trades on Jigsaw it does not show up in SC or if I had an open trade in SC and close it in Jigsaw it still appears in SC as open.
If I restart SC it still shows, if I disconnect/connect the data connection to TWS it still shows in SC.

Is there a way SC can query TWS regularly to confirm open positions so I can see correct data on the screen?

Thank you.
/Rune
[2022-01-10 15:23:17]
Sierra Chart Engineering - Posts: 104368
Refer to:
Trading Information Windows: Incorrectly Reported Trade Position Quantity (Incorrectly Reported Trade Position Quantity)

We cannot provide any further help.
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
[2022-01-10 15:35:15]
1+1=10 - Posts: 270
Hi Rune,

Both SC and Jigsaw connect to your TWS app by communicating through the TWS API. If you're unfamiliar with the term API, it just a set of agreed upon methods that software can use to exchange information. So any SC and Jigsaw, when they want to get any market data, orders, positions, etc. from TWS do so through the API. In API terminology, SC and Jigsaw are clients of the TWS API. (In fact, you can have up to 32 clients connecting to one TWS app.)

The problem is that only one client of the TWS API can be what is known as the Master API Client, and only the master client receives updates about interactions with TWS that are the result of all clients! So in your case, Jigsaw has been set as the Master API Client and so is receiving all updates. SC on the other hand, is not the master client, so only can see information that it was directly responsible for creating. So it cannot see that you closed a trade on Jigsaw even if you opened it in SC.

Sadly, there's no way using TWS to have SC & Jigsaw or any other combination of softwares both be aware of all interactions.

In the TWS app settings there is a section under API -> Setting where you can see a setting entitled Master API Client ID which briefly explains these concepts: https://guides.interactivebrokers.com/tws/usersguidebook/configuretws/apisettings.htm

Good luck figuring out a workaround!
[2022-01-10 15:39:27]
Sierra Chart Engineering - Posts: 104368
This is not true in regards to Positions:
The problem is that only one client of the TWS API can be what is known as the Master API Client, and only the master client receives updates about interactions with TWS that are the result of all clients!

All clients will receive Position updates.

Actually there is:
Sadly, there's no way using TWS to have SC & Jigsaw or any other combination of softwares both be aware of all interactions.
And Sierra Chart does send the necessary commands to the TWS API to ensure it gets all of the order updates. And Position updates will come regardless assuming TWS is sending them, it normally should.

The information we linked to in our prior post does have all the relevant information on this subject.
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: 2022-01-10 15:41:10
[2022-01-10 15:41:24]
User405165 - Posts: 5
Thanks, yeah makes sense and I recall there was an API master ID of 1. Probably can't have two "masters" and so SC is using some random high number instance ID and Jigsaw is using 1 as ID.
I guess I can switch SC to master and Jigsaw can have some random ID and we'll see if it may pick up the current positions...
[2022-01-10 16:30:07]
1+1=10 - Posts: 270
SCEngineering -- Yes, it does make sense that clients should be able to see positions even if they can't see another client's orders. My apologies.

User405165 -- If you're technically savvy you can consider turning on the TWS API's logs which will write to file that you can read to see what requests Jigsaw & SC are making:
https://interactivebrokers.github.io/tws-api/support.html

Good luck!
[2022-01-10 20:01:55]
User405165 - Posts: 5
I'm savvy but scrolling through TWS logs is the last thing I want to do :) However, I might end up there if I don't find another workaround. I've not done much to try and find the root cause, just followed the article supplied first and looked around myself for a little bit.

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

Login

Login Page - Create Account