Login Page - Create Account

Support Board


Date/Time: Thu, 31 Oct 2024 10:13:00 +0000



Continued problems with IB and futures contracts

View Count: 1739

[2016-01-04 16:51:02]
User62936 - Posts: 68
Hello,

I thought all the problems were fixed with the reporting of trade positions with IB, but I realized today that I am still having problems. I am on version 1343. Note in the attached picture how a long entry in green is followed by an exit in black, for the correct way it worked today at first. Later, after a long entry again, the exit is red, and not black, as if a short was initiated as opposed to the sell order to exit the long trade. These trades also do not update in the PnL window, and also, for the 2nd time that it was incorrect, the position line also disappeared.

I realize that you guys said that there isn't much more you can do until IB fixes their API, but I wonder if you are aware of all the limitations at the moment and can post them. For the first trade, I never had my position line disappear, and the exit is correct, but then I had the problems with exits not being correct and the position line disappearing just an hour later, so this is highly inconsistent. Is there an issue of time and how long in a trade you are? Earlier, before you had some fixes, it was even difficult for me to get out of a trade because Sierra didn't even think I was in one, and I had to revert to TWS to close the trade that way. I fear that this will happen again if Sierra isn't even marking the exits properly. I am also worried that with Sierra trying to update trade positions every 4 seconds which is what I read in another posting, what happens in those seconds before it updates? It seems like there are certain periods of time where Sierra is unaware that you are in a trade.
Private File
[2016-01-04 19:03:57]
Sierra Chart Engineering - Posts: 104368
for the 2nd time that it was incorrect, the position line also disappeared.
This is the reason for the problem. When you see this happen, go to Trade >> Trade Orders and Positions >> Positions tab. Do you see the Position displayed there and is the symbol correct?

We are aware of no outstanding problems unless the Interactive Brokers account has multiple subaccounts. But whether you would experience a problem or not, we have absolutely no idea. One user reported a problem but we do not know if others would. So it is not something that we would officially document especially being we have no understanding of why it is happening.

Is there an issue of time and how long in a trade you are?
No.

I am also worried that with Sierra trying to update trade positions every 4 seconds which is what I read in another posting, what happens in those seconds before it updates?
This is not the case. The Trade Position data is updated by Interactive Brokers as it changes unless your TWS account has multiple subaccounts. In that case, the Positions are updated when Sierra Chart receives a fill. The whole thing really is kind of silly that we have to go through such an effort.
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-01-04 20:58:03
[2016-01-04 19:18:22]
User62936 - Posts: 68
I just tried to show an example of this... and sadly... even lost a few bucks. Attached is the picture with the position window.

In the first window, you see the position, but the little red triangle doesn't yet appear, which it usually doesn't for a couple of seconds, but at least the position is listed in the position window.

In the second picture, you see that I no longer have a position in the position window, but I am still very much in the trade, where I took the short, and now you can see the little red triangle.

I didn't even wait to close this trade in Sierra since I wasn't sure if it would even work, so I went to IB TWS to close it.

Do you agree that is very unexpected?

Edit: I actually see that on the first image, the chart on the left which is the 1 min chart, I see the little red triangle in the first attachment, but not on the chart on the right which is a 5 sec chart. This part is ok because I know the little red triangle shows up after a few seconds, but the position line was always there and now its not, and of course Sierra after a few seconds doesn't think that I am in a trade.
Date Time Of Last Edit: 2016-01-04 19:22:15
Private File
Private File
[2016-01-04 19:33:05]
User62936 - Posts: 68
And, and for your other question, I do not have multiple subaccounts with IB, just the main one.
Date Time Of Last Edit: 2016-01-04 19:33:30
[2016-01-04 21:02:17]
Sierra Chart Engineering - Posts: 104368
Update Sierra Chart to the latest release with Help >> Download Prerelease.

After that, when connecting to IB provide a copy of all of the lines in the Trade >> Trade Service Log. Select the lines and use the Copy Selection button at the top.
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-01-04 21:08:42
[2016-01-04 21:38:44]
User62936 - Posts: 68
Ok... I will try and do this tomorrow if I see any good trades and can reproduce the error.

I did try one more trade today just to cover my tiny little loss from before and it worked out as it should, so I would say this problem is quite intermittent. I had logged out of IB, logged into the paper trading account from IB to test, and Sierra worked fine in terms of the correct entry and exit marked as well as the position line not disappearing. Then I logged back in with the live account to take the live trade which worked. So my last trade of the day worked as it should, but it still of course makes me scared going forward.

I will try and update tomorrow with any trades I take.

As for today, I looked through this log and its a little messy since I have also used the paper trading account, but here is a sample of what it says at the times where I think I had trouble with some of the trades. (I have masked my account number in the one line where I see it written). These are 2 random snippets from roughly where I think problems were happening. Does this point to anything conclusive or give you a hunch as to what the problem could be? I don't believe I have any restrictions on trading outside regular trading hours and I haven't touched these settings in over a year of using Sierra so I'm not sure what these error messages could mean.

----------------------
Interactive Brokers | Sent reqOpenOrders request | 2016-01-04 11:06:19
Trading message from IB: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. ServiceOrderID: 3090. | 2016-01-04 11:07:33
Trading message from IB: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. ServiceOrderID: 3091. | 2016-01-04 11:07:33
Interactive Brokers | Sent reqOpenOrders request | 2016-01-04 11:08:18
Unable to Flatten or Reverse because a Position does not exist. Working orders will be canceled | Symbol: NQ-201603-GLOBEX | TradeAccount: U129**** | 2016-01-04 11:08:46 *
Trade Order Error - IB error: Order rejected - reason:No such order. Internal Order ID: 15247. Service Order ID: 3092. Symbol: NQ-201603-GLOBEX | 2016-01-04 11:08:47 *
Interactive Brokers | Sent reqOpenOrders request | 2016-01-04 11:09:01
Trading message from IB: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. ServiceOrderID: 3093. | 2016-01-04 11:12:21
Trading message from IB: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. ServiceOrderID: 3094. | 2016-01-04 11:12:21
Interactive Brokers | Sent reqOpenOrders request | 2016-01-04 11:12:41
Trading message from IB: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. ServiceOrderID: 3096. | 2016-01-04 11:22:53

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

Trading message from IB: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. ServiceOrderID: 3093. | 2016-01-04 11:12:21
Trading message from IB: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. ServiceOrderID: 3094. | 2016-01-04 11:12:21
Interactive Brokers | Sent reqOpenOrders request | 2016-01-04 11:12:41

Trading message from IB: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. ServiceOrderID: 3097. | 2016-01-04 11:22:53
Interactive Brokers | Sent reqOpenOrders request | 2016-01-04 11:23:16
Trading message from IB: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. ServiceOrderID: 3100. | 2016-01-04 11:27:15
Interactive Brokers | Sent reqOpenOrders request | 2016-01-04 11:27:39
[2016-01-04 22:04:49]
Sierra Chart Engineering - Posts: 104368
The log lines you posted are not what we need to see.

What we need to see is displayed in the latest release near the top of the log, and indicates the initial requesting of Trade Position data.
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-01-04 22:20:46]
User62936 - Posts: 68
Ah, I see, hence the need to upgrade to the pre-release. Ok, hopefully I can get this to you tomorrow.
[2016-01-04 22:26:00]
User62936 - Posts: 68
Actually, I may have misunderstood. I'm not sure if you need to see the log after doing some trades or right now. In any case, I just upgraded with the pre-release and now have 1348 and here is the copy of the trade log.
---------------

Trade Activity Log file read result: 41816 records inserted. 0 records filtered. | 2016-01-04 14:23:26
Trade Activity Log file date-time limits: Sim records date-time limit is 2015-12-30 00:00:00. Non-sim records date-time limit is 2015-01-09 00:00:00. Non-sim fill record date-time limit is 2013-01-19 00:00:00. | 2016-01-04 14:23:26
Interactive Brokers | Requesting Trade Positions (IB account data updates) for account: U129* | 2016-01-04 14:23:37
Interactive Brokers | Received Trade Positions download end message for account U129* | 2016-01-04 14:23:37
Interactive Brokers | Stopping automatic Trade Position updates for account: U129* | 2016-01-04 14:23:44
Interactive Brokers | Requesting Trade Positions (IB account data updates) for account: U129* | 2016-01-04 14:23:44
Interactive Brokers | Sent reqOpenOrders request | 2016-01-04 14:23:44
Interactive Brokers | Received Trade Positions download end message for account U129* | 2016-01-04 14:23:44
Interactive Brokers | Stopping automatic Trade Position updates for account: U129* | 2016-01-04 14:23:44
Interactive Brokers | Requesting Trade Positions (IB account data updates) for account: U129* | 2016-01-04 14:23:44
Interactive Brokers | Sent reqOpenOrders request | 2016-01-04 14:23:44
Interactive Brokers | Received Trade Positions download end message for account U129* | 2016-01-04 14:23:44
[2016-01-04 23:44:54]
Sierra Chart Engineering - Posts: 104368
We are not seeing any problems with the request or the response for Trade Positions data. Therefore, you need to ask Interactive Brokers why it is when the Position changes for a particular symbol, there is not an automatic update being sent to the connected client, in this case Sierra Chart.

From what we can see, the update is not being sent. Or the Position Quantity is 0 in which case you will not see it displayed since that position line would get removed from the list.

They will need to see the log files:
Interactive Brokers Trading Service: Procedure for Providing TWS Log Files
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-01-05 08:33:23]
Sierra Chart Engineering - Posts: 104368
We also did a code review again this evening and did not find any indication of a problem with Position data processing from Interactive Brokers TWS.

This is especially true when there is only a single account and this is confirmed also by the Log you provided above.

This is not relevant to your Support Request, but we wrote up these requirements for when supporting a Data or Trading service:

Sierra Chart Does not Support External Service API Components: Minimum Required Quality of Data or Trading Service for Integration

Hopefully Interactive Brokers will meet these requirements one day.
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-01-05 08:34:27
[2016-01-05 15:15:21]
User62936 - Posts: 68
Thanks for the updates. I've done the changes to TWS as suggested so that I have log files to provide IB.

I haven't had any problems today after 3 trades so I will hold off on contacting them until it happens again so that at least there will be something in the log file to look at. I will update this thread if it does happen again and will hopefully also have a good answer from them if they find something wrong.
[2016-01-07 15:46:10]
User62936 - Posts: 68
So far so good these past few days with regards to the position line disappearing and the position not actually being listed in the positions tab.

But what I am seeing now is that each time I cancel an order, I get this message in the trade service log. It happens when I have a limit order that is waiting to fill, and when price takes off and I don't get a fill, I naturally cancel the order and then the log pops up each time which is annoying. I take it that perhaps this refers to the OCO orders? I cancel the main order, which has OCO orders attached, so both of those need to get cancelled as well, but it seems like the message back is that they never existed. I've never had this problem before when cancelling orders.

Trading message from IB: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. ServiceOrderID: 3162. | 2016-01-07 07:41:41
Trading message from IB: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. ServiceOrderID: 3163. | 2016-01-07 07:41:41
Trade Order Error - IB error: Order rejected - reason:No such order. Internal Order ID: 15336. Service Order ID: 3163. Symbol: NQ-201603-GLOBEX | 2016-01-07 07:41:43 *
Trade Order Error - IB error: Order rejected - reason:No such order. Internal Order ID: 15337. Service Order ID: 3164. Symbol: NQ-201603-GLOBEX | 2016-01-07 07:41:43 *
[2016-01-07 18:42:53]
Sierra Chart Engineering - Posts: 104368

Trade Order Error - IB error: Order rejected - reason:No such order. Internal Order ID: 15336. Service Order ID: 3163. Symbol: NQ-201603-GLOBEX | 2016-01-07 07:41:43 *
Trade Order Error - IB error: Order rejected - reason:No such order. Internal Order ID: 15337. Service Order ID: 3164. Symbol: NQ-201603-GLOBEX | 2016-01-07 07:41:43 *

So these are the Attached Orders of the main order? Do you have Global Settings >> General Trade Settings >> Use Server-Side OCO and Bracket Orders enabled? If the answer is yes to both of these, then you can probably safely ignore this. We will do some testing to see how this message can be avoided.
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-01-07 18:46:03]
User62936 - Posts: 68
Yes, this is correct. I have server side OCO orders enabled, and these are attached orders for the initial order that never fills and is cancelled. Thanks for looking into it.

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

Login

Login Page - Create Account