Login Page - Create Account

Support Board


Date/Time: Sat, 11 May 2024 03:25:14 +0000



Sierra and Interactive Brokers trade/fill sync issues

View Count: 2190

[2019-06-18 12:55:55]
User996666 - Posts: 16
I use Sierra with IB. I've followed all the docs carefully and I'm an experienced customer using the latest prerelease. I've been successfully executing trades using Sierra but recently lost Internet a few times and therefore had to close out my trades in TWS or the IB mobile app. My account is flat. When I log back into Sierra, it still shows that I have an open position. I've trawled this support forum and the docs for guidance but I'm unable to resolve the issue. I believe there is a bug in Sierra's processing of the IB trade history via the API. When I use Ninjatrader to connect to my IB account, it show me as flat and displays each one of my previous trades on the chart correctly. I've tried setting my client ID to 0, I've tried clearing my trade activity log and I've tried both the latest version of Gateway and TWS. One thing to note is that my IB login has 2 accounts, perhaps I'm an edge case in this regard? It appears that, for some reason, orders/fills which did not originate from Sierra are being ignored.
[2019-06-18 14:42:22]
Sierra Chart Engineering - Posts: 104368
We did recently disable the downloading of historical order fills from TWS due to a problem with duplicate fills but we think we know what the cause of that may be and we will reenable this in the next release coming out today. This will be version 1936.

In regards to an incorrectly reported Position Quantity, most likely you are referring to the Trade Stats for Charts (Chart Stats) tab. In any case, refer to:
Trading Information Windows: Incorrectly Reported Trade Position Quantity (Incorrectly Reported Trade Position Quantity)

In particular item 6 in that section.
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: 2019-06-18 14:48:41
[2019-06-19 09:05:33]
User996666 - Posts: 16
Unfortunately the problem still exists with version 1936. I also tried rolling back to the latest current version (1928) and no luck. When I check the Chart Stats, as mentioned in item 6, it correctly reports that I have no position, I am flat. Yet, on the chart's Trade Window and in the Positions tab (Orders and Positions) it incorrectly says I have an open position. I can also see no evidence that historical fills have been downloaded.
Date Time Of Last Edit: 2019-06-19 09:06:07
[2019-06-19 10:43:46]
Sierra Chart Engineering - Posts: 104368
Yet, on the chart's Trade Window and in the Positions tab (Orders and Positions) it incorrectly says I have an open position.
Therefore, this is an IB issue! Do not not tell us otherwise. We know what we are talking about.

Refer to:
Trading Information Windows: Incorrectly Reported Trade Position Quantity (Incorrectly Reported Trade Position Quantity)
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: 2019-06-19 11:04:50
[2019-06-19 10:55:58]
User996666 - Posts: 16
I don't doubt that you do. Respectfully, if this is indeed an IB issue, are you able to explain why the position information and all historical order fills are correct when I load my account up in Ninjatrader?
[2019-06-19 11:05:30]
Sierra Chart Engineering - Posts: 104368
We are referring specifically to:
Yet, on the chart's Trade Window and in the Positions tab (Orders and Positions) it incorrectly says I have an open position.

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
[2019-06-19 11:27:54]
User996666 - Posts: 16
Having gone through those steps again, I'm unfortunately still unable to resolve the issue. I can confirm that "Use Fill Calculated Positions-Global", "Trade Simulation Mode" and "Use Order Fill Calculated Position" are all disabled/unchecked. The correct trading account is also selected. Do you suggest I contact IB as my next step? The fact that Ninjatrader is reporting correctly when connected to the same API would suggest that there's no problem with the data.
[2019-06-19 11:45:35]
Sierra Chart Engineering - Posts: 104368
There is definitively a problem with the Position data data reported by Interactive Brokers for your account. That is 1000% certain. Unless you are misinterpreting what you are seeing on Trade >> Trade Orders and Positions >> Positions but that information is quite straightforward.

Yes contact Interactive Brokers and there are two different ways of obtaining position data. The other program maybe using a different method.

Also for the record this particular issue is something that we rarely if ever hear about. Although we may have heard about it recently. The more typical issue with Interactive Brokers is that they report no position for a particular symbol and account.
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
[2019-06-19 12:08:34]
User996666 - Posts: 16
I guess you rarely hear about it because I believe it only occurs when someone opens a trade in Sierra but then closes it using TWS or the IB app. I will contact them to see if they can help.
[2019-06-19 13:16:14]
User996666 - Posts: 16
I have spoken to IB technical support. They setup the TWS API logging, had me reconnect Sierra to re-request the position data and then had an API engineer review the logs. They say they can confirm from these logs that the API is not reporting an open position and therefore suspect the issue is with Sierra.
[2019-06-19 14:30:19]
Sierra Chart Engineering - Posts: 104368
We have an idea of what the problem could be. And we definitely do not believe the way that Interactive Brokers has analyzed the problem is technically correct.

Follow the instructions below:

Follow the instructions here to clear the Message Log:
Message Log: Clearing the Message Log

Reconnect to the data feed:
File Menu: Procedure to Reconnect to the Data and Trade Servers

After about 30 seconds, provide a copy of the Message Log following these instructions:
https://www.sierrachart.com/index.php?page=PostingInformation.php#MessageLog
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
[2019-06-19 14:49:14]
User996666 - Posts: 16
Message Log sent directly for analysis using this thread ID as a reference.
[2019-06-19 14:55:51]
Sierra Chart Engineering - Posts: 104368
We would like to look at this with remote assistance. Could you please set your telephone number here:
https://www.sierrachart.com/UserControlPanel.php?page=ManageAccountInfo


And let us know when done.
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
[2019-06-19 15:00:13]
User996666 - Posts: 16
Telephone number added.
[2019-06-19 18:47:19]
Sierra Chart Engineering - Posts: 104368
We did get the problem resolved with a nonexisting position not clearing when there are no existing Positions for a particular Trade Account.

We tested the historical order fills request to TWS and the processing of the response and that did work properly on the TWS demo system. So in your case TWS must not be sending the fills.

For reference:
ActivityType  DateTime  Symbol  OrderActionSource  InternalOrderID  ServiceOrderID  OrderType  OrderStatus  Quantity  FilledQuantity  FillPrice  BuySell  Price  Price2  TradeAccount  OpenClose  ParentInternalOrderID  PositionQuantity  FillExecutionServiceID  HighDuringPosition  LowDuringPosition  Note  AccountBalance
Fill  2019-06-19 13:05:32.000  ES-201909-GLOBEX  IB historical fills data (Restored)    22    Filled  1    2922.0000000  Buy      DU230024        000130e8.5d0960c5.01.01        
Fill  2019-06-19 13:05:35.000  ES-201909-GLOBEX  IB historical fills data (Restored)    23    Filled  1    2922.0000000  Buy      DU230024        000130e8.5d0960c6.01.01        
Fill  2019-06-19 13:05:36.000  ES-201909-GLOBEX  IB historical fills data (Restored)    24    Filled  1    2922.0000000  Buy      DU230024        000130e8.5d0960c7.01.01        
Fill  2019-06-19 13:05:38.000  ES-201909-GLOBEX  IB historical fills data (Restored)    25    Filled  1    2922.0000000  Buy      DU230024        000130e8.5d0960c8.01.01        
Fill  2019-06-19 13:05:39.000  ES-201909-GLOBEX  IB historical fills data (Restored)    26    Filled  1    2922.0000000  Buy      DU230024        000130e8.5d0960c9.01.01        

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: 2019-06-19 18:47:46
[2019-06-19 19:05:43]
User996666 - Posts: 16
Thanks for your time earlier and I'm glad you were able to fix the first bug. I can see now that my historical fills are being downloaded also. I can view them in the Trade Activity Log but unfortunately they are still not being displayed on the charts? I have ensured that on the chart the appropriate account is selected in it's Trade Window and that I have "Show Order Fills" enabled/checked. Any idea why this could be the case?
Date Time Of Last Edit: 2019-06-19 19:11:28
[2019-06-20 15:44:43]
Sierra Chart Engineering - Posts: 104368
Most likely this is because there is a symbol mismatch. This is a problem with Interactive Brokers ddue to the complexity of symbols and multiple formats. You would have to edit the symbol of the order fills in the Trade Activity Log to match the symbol in the chart exactly.
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: 2019-06-20 15:45:12
[2019-06-20 16:05:11]
User996666 - Posts: 16
Thanks. Yes, it does look like there's a symbol mismatch when the trade activity is generated from an IB historical fill. For example, the chart I'm using has the symbol "MES-201909-GLOBEX-USD" and the historical fills have the symbol "MES-201909-GLOBEX". However, when the trades have been taken within Sierra, an IB order fill, the symbol matches the chart. Can the mismatch on historical fills perhaps be resolved through a code fix? Manually editing the trade history feels like a temporary workaround rather than a solution.
Date Time Of Last Edit: 2019-06-20 16:06:18
[2019-06-25 02:11:32]
Sierra Chart Engineering - Posts: 104368
This will be solved in the next release.
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
[2019-06-27 10:09:37]
User996666 - Posts: 16
I've just tested v1941, installed into a fresh directory. It looks like the IB historical order fills are now coming in with matching symbol names but it frustratingly looks like only approx 7 days of fill history is being downloaded. Are you able to confirm if this correct and if so could I ask that this number be increased significantly please?
[2019-06-27 15:21:26]
Sierra Chart Engineering - Posts: 104368
This limit is not on the Sierra Chart side. The limit on the Sierra Chart side is 31 days for Interactive Brokers . We could increase that but we do not see how that is going to help you. If you also look at the Trade >> Trade Service Log you will see the starting date specified when you connect to TWS.

For long-term order fill history you should use this service for futures trading:
Sierra Chart / Trading Technologies Futures Order Routing Service

Also you do not need to install Sierra Chart into a fresh directory to test. You just need to clear the Trade Activity for the particular account and reconnect to the data feed:
Trade Activity Log: Automatic Insertion of Missing Order Fills For Non-Simulated Trading
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
[2019-06-27 15:33:29]
User996666 - Posts: 16
I checked the Trade Service Log and it appears that 31 days are being requested for my first IB account but only a few days are being requested for my second IB account. As mentioned earlier in the thread, my IB login has 2 linked accounts. Perhaps you could check whether this is an edge case and confirm that 31 days are being requested for all linked accounts? Many thanks.
[2019-06-27 15:43:20]
Sierra Chart Engineering - Posts: 104368
The number of days requested is going to be from the Date-Time most recent order fill for a particular trade account. Go through the trade activity log and locate that fill and then delete that one and any others before it to establish the starting Date-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

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

Login

Login Page - Create Account