Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 13:21:21 +0000



Interactive Broker Trade Query

View Count: 2141

[2016-12-19 14:49:09]
hursthead - Posts: 28
Hi, on the 16 December 2016, I went long 2 contracts of Jan 2017 expiry crude oil future contract at 51.08 for both contracts respectively. The 2 contracts have an OCO order attached to it and I was stopped out sold 2 contracts at 51.00 and 50.99. I thought I was flat and switched to sim mode right after that, but it became evident to me today that I had an opened position running since Friday itself. I spoke to IB and they told me that I apparently opened a short position at 50.99 4 seconds after I was stopped out. On top of that, it was a simple order with no OCO attached to it which should never occur because I always have an attached order with the parent order when I trade live. My question is, is there a way to find out if this is an error trade because I find it impossible that I would open a fresh short position right after I was stopped out 4 seconds later. Attached it the trade confirmation report from IB with the timestamp for your reference. Thanks.
Private File
[2016-12-19 16:50:18]
Sierra Chart Engineering - Posts: 104368
We need to look at the Trade Activity Log. Follow through the instructions here:
http://www.sierrachart.com/index.php?page=doc/TradeActivityLogAnalysis.php#SupportAssistedTradeActivityLogAnalysis

It says there is a cost for this. There is going to be no cost in this case. It is not difficult for us to look into.

We will require the Trade Activity Log file as requested by the instructions. You can attach it here following these instructions:
https://www.sierrachart.com/index.php?page=PostingInformation.php#AttachFile

By default it should be privately attached.
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-12-19 16:51:07
[2016-12-19 18:03:21]
hursthead - Posts: 28
Thank you for your response. Kindly find attached the trade activity log.
Private File
Private File
[2016-12-19 18:08:55]
Sierra Chart Engineering - Posts: 104368
In the attachment in post #1 we need to know the time zone of Trade 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
[2016-12-19 18:30:06]
hursthead - Posts: 28
My computer clock is set to Malaysia time, but SC is set to US Eastern Time. If I recall correctly, the trade was done between 3-6pm Malaysia time. I'm sorry I cant be more specific because it was on Friday. Please let me know if you need more details. Thanks.
[2016-12-20 01:37:52]
Sierra Chart Engineering - Posts: 104368
One thing we are observing from the Trade Activity Log is that the order fill execution reports and the Position updates from Trader Workstation are slow to be received. Many seconds later than we would expect.

We can see what is happening.

One of the Stop orders was filled. And then there is this flatten action that you performed:
ActivityType  Symbol  DateTime  OrderActionSource  InternalOrderID  ServiceOrderID  OrderType  PositionQuantity  Quantity  BuySell  Price  Price2  OrderStatus  FillPrice  FilledQuantity  TradeAccount  OpenClose  ParentInternalOrderID  FillExecutionServiceID  HighDuringPosition  LowDuringPosition
Order  CL-201701-NYMEX  2016-12-16 02:36:17.509  CL-201701-NYMEX [M] Point & Figure 10-3 #12 | User order entry. Flatten&Cancel | Last: 51.02. Current Position quantity: 1  3656    Market  1  1  Sell      Order Sent      U**  Close    
    


And at that same time, the other Stop order filled. So overall the Position became -1.
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-12-20 01:39:01
[2016-12-20 02:19:04]
hursthead - Posts: 28
Yes, I remember there was a brief lag when the stop order was filled. If you look at the timestamp of the orders they are very near to each other and I find it hard to believe that I clicked on the flatten action while my order is very close to getting stopped out. Is there a way to find out this flatten action was performed by me physically or due to a bug in the platform perhaps due to the lag in receiving order fill execution and position update from TWS?
[2016-12-20 02:22:42]
hursthead - Posts: 28
Another question, if you suspect this lag is related to this issue, could you tell me what is the cause of the lag? Was it my internet connection? Or was it IB's connection problem? Thanks.
[2016-12-20 02:45:05]
Sierra Chart Engineering - Posts: 104368
The Trade Activity Log Order Action Source field makes it very clear that a Flatten Action was manually invoked from this particular chart:
CL-201701-NYMEX [M] Point & Figure 10-3 #12 | User order entry. Flatten&Cancel

This could have been by pressing the Flatten button, using the keyboard command, or using the Chart Trade Shortcut menu.

The lag is not the cause of the issue. We do not know what that is from.
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-12-20 02:45:49
[2016-12-20 11:15:11]
User94740 - Posts: 333
I have had this problem as well hursthead and it caused a lot of headaches and extra losses due to lag time of your internet connection. Please check your internet speed. Since my landline has now been furnished for 300mbps everything works fine.
Date Time Of Last Edit: 2016-12-20 11:16:02
[2016-12-20 13:18:38]
hursthead - Posts: 28
Hi User94740, thanks for your response. I am very certain I did not click on the flatten button because it does not make sense at all for me to open a new position right after I got stopped out. In fact, the live trade was a mistake to begin with - I was in a self-imposed weekly stop and did not do any live trades during the week. My PC rebooted overnight due to Windows update and somehow the latest chartbook setting was not saved. As a result, when I re-opened SC it was the previously saved setting and it was set to live trading instead of sim trading. Unknown to me and of course this is my fault for not checking before trading, I entered the 2 contracts live instead of sim but its a good thing I always have attached OCO orders with the trade so I got stopped out at a small loss. So what turned out to be a mistake on my part ended up being a very expensive mistake discovered by me a few days later with this issue now.

I am curious why would a faster internet connection fix the issue. I am currently on a 30mbps fixed line and to send data to the broker and back etc does not take much bandwidth. I am however limited by latency as I am located in South East Asia so my latency to IB is very poor typically >200ms vs 10-50ms for those of you located in the US. What I have observe though is that my connection with IB is very unstable, depending on the day and time I observe 5-10 disconnections with IB in a period of 30mins - screenshot of connection with IB at around 8.50pm UTC+8 time - and it kept disconnecting and reconnecting arbitrarily. I am very frustrated with the situation, I do not know if this lag in connection issue is causing this or not but SC is adamant that issue lies with me clicking on flatten manually. Could you tell me more about your case and what was SC's response to it? Surely if it was not your fault and a trade was initiated without you knowing then there must be a bug with the platform? If so, how come you and me are affected but not the majority else?

Thanks.
imageping.png / V - Attached On 2016-12-20 12:49:38 UTC - Size: 65.41 KB - 289 views
image2016-12-16.png / V - Attached On 2016-12-20 12:56:18 UTC - Size: 42.31 KB - 257 views
image2016-12-16 (1).png / V - Attached On 2016-12-20 12:56:23 UTC - Size: 42.32 KB - 252 views
image2016-12-16 (2).png / V - Attached On 2016-12-20 12:56:26 UTC - Size: 73.07 KB - 258 views
[2016-12-20 14:51:28]
User94740 - Posts: 333
I had also contacted SC and IB about similar situations. Response was similar. My conditions: I had 6mbps to work with for sending orders to Chicago from Spain and you have to remember, there are certain times of the day where internet traffic is substantially higher, so I was working with maybe 3mbps or even less. Nonetheless, I have had similar situations in which I noticed the market going against my OCO, so I might flatten the position earlier. Many times the market had already hit my stop while I was flattening my position and due to latency I had sent quasi another order by flattening. Sometimes TWS was so slow to register the stop I then reacted by trying to flatten the position even though it had already been flattened and once again was in the market. So, I had two situations: I tried to be preemptive or TWS was too slow to show the flattening. Also, if I am correct, your orders are "not" in the order books, but are kept on the platform, so if you have a fast moving market, then this can also cause trouble. Reaction time between TWS and SC should be ok, but there is always some delay though it might be minute. I am now trading with fiber optic so my orders are working. My TWS platform was also losing the connection quite often. Speed is one part of the equation, so if you are wrong on the direction, then it is imperative to be able to adjust quickly! I just did a test for latency and at 148ms to Arlington, Illinois.
[2016-12-20 18:53:31]
Sierra Chart Engineering - Posts: 104368
You invoked the Flatten and Cancel operation about a half second before the stop order filled. It is very clear the Flatten operation was invoked. There is no mistake about that. Perhaps it was inadvertent on your part.

Also the Stop Attached Order could not be canceled as is indicated by this line:
ActivityType  Symbol  DateTime  OrderActionSource  InternalOrderID  ServiceOrderID  OrderType  PositionQuantity  Quantity  BuySell  Price  Price2  OrderStatus  FillPrice  FilledQuantity  TradeAccount  OpenClose  ParentInternalOrderID  FillExecutionServiceID  HighDuringPosition  LowDuringPosition
Order  CL-201701-NYMEX  2016-12-16 02:36:19.146  IB error 201: Order rejected - reason:Cannot cancel the filled order  3652  1197  Stop    1  Sell  50.99    Error  50.99  1  U**  Close        

Make sure there is no keyboard shortcut set up for Flatten and Cancel:
http://www.sierrachart.com/index.php?page=doc/TradeWindow.html#KeyboardShortcuts

My PC rebooted overnight due to Windows update and somehow the latest chartbook setting was not saved.
In the next release changes to the Simulation Mode setting will be immediately saved to the configuration file.


Also, if I am correct, your orders are "not" in the order books, but are kept on the platform, so if you have a fast moving market, then this can also cause trouble.
In this particular case all orders were with Interactive Brokers because a server-side bracket order was being used.
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-12-20 18:54:40
[2016-12-21 03:33:59]
hursthead - Posts: 28
Thanks for the reply. I did a check on keyboard shortcut and apart from 2 orders which are buy/sell orders there is no flatten shortcut. Noted on the lag, perhaps I did try to flatten before it went against me but the stop had already triggered like User94740 mentioned, that might explain why a new position could be established 4 seconds later. In such an instance, I recall my position showing flat before reverting to sim mode.

I'm not trying to blame anyone for this problem, the risk always lies with the trader but I would like to avoid it from happening again. Could you advise in such a situation when a cancel order failed and a new position established from the flatten function, would it be possible that there is a lag in getting the position update from IB? If so, is there a way to manage this situation or perhaps mitigate it? Would such a problem occur if I used a different broker/data provider? I am considering Amp Futures/CQG as a backup alternative if this can avoid similar things from happening with IB.
[2016-12-21 04:52:48]
Sierra Chart Engineering - Posts: 104368
Could you advise in such a situation when a cancel order failed and a new position established from the flatten function, would it be possible that there is a lag in getting the position update from IB?
Yes this is the case here. There was a seven second delay as you can tell from the Trade Activity Log.

Would such a problem occur if I used a different broker/data provider?
Yes, this for sure would help.

CQG is fine. Also consider CTS:
https://www.sierrachart.com/index.php?page=doc/CTS_T4.php
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-12-21 05:59:59]
hursthead - Posts: 28
seven seconds delay? that is a lot! from what you observe, is this due to IB or due to my connectivity?
[2016-12-21 06:11:02]
Sierra Chart Engineering - Posts: 104368
Would seem hard to believe due to connectivity, but this is not something we have any way to determine.

Other users may have some better experience 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

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

Login

Login Page - Create Account