Login Page - Create Account

Support Board


Date/Time: Tue, 07 May 2024 13:09:11 +0000



Interactive Brokers

View Count: 1149

[2016-07-05 14:35:30]
User841604 - Posts: 20
I've started to test an ACSIL system, i'm using limit orders to enter at X price with Stop and Target attached. I could see that the value displayed by the horizontal entry line it's no always correct and the error is not a multiple of the tick size, after a relative large set of trades i could verify that some entries were executed by IB 1 tick up/down than the value set by NewOrder.Price1. Is this common with IB?
Date Time Of Last Edit: 2016-07-05 14:41:47
[2016-07-05 17:32:43]
Sierra Chart Engineering - Posts: 104368
Yes this does make sense and it is explained here:
https://www.sierrachart.com/index.php?page=doc/doc_TradeStatusWindows.html#TradeServiceProvidedAveragePrice

There is an Interactive Brokers specific setting which controls 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
[2016-07-06 02:51:03]
User841604 - Posts: 20
Thanks Support! I'll try this tomorrow.
[2016-07-06 15:19:04]
User841604 - Posts: 20
I tried this and some limits are still being executed +/- a tick the value NewOrder.Price1 gets, im logging this value in my system so i can compare the value i see in the log window to the interactive trade activity window. This values are the same i can see in Trade>Trade Orders And Position window, between Price and Average Fill Price, and sometimes the difference is 2 ticks. Since i'm using limits, i want to execute the order only at the price i'm passing to NewOrder.Price1 otherwise I do not want to execute the order, so the difference between Price and Average Fill Price should always be equal to zero. How can i achieve this?
[2016-07-06 17:45:00]
Sierra Chart Engineering - Posts: 104368
Did you set Global Settings >> Data/Trade Service Settings >> Use Interactive Brokers Provided Position Average Price to false?

I tried this and some limits are still being executed +/- a tick the value NewOrder.Price1 gets,
Provide us the Fill activity line from the Trade Activity Log for this particular order. Here are instructions:
https://www.sierrachart.com/index.php?page=doc/doc_TradeActivityLog.php#TradeActivityLogToSupport
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-07-06 19:09:56]
User841604 - Posts: 20
Yes i set that option to Flase.
Here is an example:

ActivityType  DateTime  Symbol  OrderActionSource  InternalOrderID  ServiceOrderID  OrderType  Quantity  BuySell  Price  Price2  OrderStatus  FillPrice  FilledQuantity  TradeAccount  OpenClose  ParentInternalOrderID  PositionQuantity  FillExecutionServiceID
Fill   2016-07-06 19:02:25.469  NQ-201609-GLOBEX  IB order fill (execution)  68933  722  Limit  1  Sell  4435.75    Filled  4436.00  1  DXXXXXXX  Open    -1
Order 2016-07-06 19:02:39.951  Requesting Open orders from trading service                Unspecified      None        
Order 2016-07-06 19:03:57.592  NQ-201609-GLOBEX  IB order status update  68935  724  Stop  1  Buy  4437.00    Canceled      DXXXXXXX  Close  68933  -1  
Order 2016-07-06 19:03:57.795  NQ-201609-GLOBEX  IB order fill (execution)  68934  723  Limit  1  Buy  4433.25    Filled  4433.25  1  DXXXXXXX  Close  68933  -1  
Order 2016-07-06 19:03:57.796  NQ-201609-GLOBEX  Updated Internal Position Quantity to 0                Unspecified      DXXXXXXX        
Fill   2016-07-06 19:03:57.797  NQ-201609-GLOBEX  IB order fill (execution)  68934  723  Limit  1  Buy  4433.25    Filled  4433.25  1  DXXXXXXX  Close

Date Time Of Last Edit: 2016-07-06 19:13:04
[2016-07-06 19:13:10]
Sierra Chart Engineering - Posts: 104368
It is completely reasonable for a Sell Limit order to fill at a higher price than its limit price. You cannot control this. This is simply the reality of a limit order.
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-07-07 05:04:35]
User841604 - Posts: 20
Ok thanks, there are some times that the limit target is not executed and the order remains open as the price goes away, how should i solve this? Should i use OCO instead? Can you provide me with an example on how to use OCO to execute a limit order at X price value with the stop and target set, i don't think the examples in the folder work for this. Is there any problem using OCO with IB?
[2016-07-07 18:12:37]
Sierra Chart Engineering - Posts: 104368
There are several ACSIL examples for working with Target and Stop orders. Refer to:
https://www.sierrachart.com/index.php?page=doc/doc_ACSILTrading.html#ExampleCode

No problem with using Target and Stop orders with Interactive Brokers.
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-07-07 18:14:13]
Sierra Chart Engineering - Posts: 104368
The code examples are located in this file:
/ACS_source/TradingSystem.cpp

Which is located in the folder that Sierra Chart is installed to.
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-07-07 18:15:11
[2016-07-07 22:17:28]
User841604 - Posts: 20
Yes, i saw all of the examples, there are several OCO order types, i just wanted to know which one or how should i combine them in order to simply send a limit with stop and target attached. Should i use SCT_ORDERTYPE_OCO_LIMIT_STOP, and set the entry, target and stop? I would like to see an example with this order type, i only saw an example with SCT_ORDERTYPE_OCO_BUY_STOP_SELL_STOP in the folder.
Date Time Of Last Edit: 2016-07-07 22:29:09
[2016-07-07 22:25:43]
Sierra Chart Engineering - Posts: 104368
No do not use that order type. That is for a different type of OCO order.

Look at the
/ACS_source/TradingSystem.cpp/scsf_TradingExampleWithAttachedOrdersDirectlyDefined study function example.
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-07-07 22:29:48]
User841604 - Posts: 20
How does SCT_ORDERTYPE_OCO_LIMIT_STOP work? I saw that example, is similar to what i'm doing, i'm using limits, and sometimes the target doesn't get filled, how can i solve this? I ask about OCO just to know if they can help. Should i add a market target order 1 tick above the limit target in case of a long entry, in order to close the position if the limit doesn't get filled? I would like to have any recommendation.
Date Time Of Last Edit: 2016-07-07 22:44:11
[2016-07-08 04:47:39]
Sierra Chart Engineering - Posts: 104368
This is documented here:
https://www.sierrachart.com/index.php?page=doc/doc_OrderTypes.html#OCOLimitandStop

This question is not within the scope of our support:
and sometimes the target doesn't get filled, how can i solve 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-07-08 04:48:48
[2016-07-08 17:11:47]
User841604 - Posts: 20
Ok, i the case im using limit orders with stop and target limit attached, can i add another target(s_SCNewOrder::Target2Price) but market type above the target limit in a long entry without increasing position size?. I want to know what possibilities i have in acsil using any of the order tyes to be able to flatten limit targets that haven't been filled without a manual algorithm checking for this events. If i have to check this from acsil and sierra disconnects i wont be able to flatten the order if this happens.
Date Time Of Last Edit: 2016-07-08 17:17:10
[2016-07-08 17:38:04]
Sierra Chart Engineering - Posts: 104368
Obviously a market order is going to fill right away. You cannot use a market order for an Attached/Target Order.
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-07-08 20:54:11]
User841604 - Posts: 20
Ok, so it is no possible to send a limit to IB with stop and target attached that in case that the target doesn't get filled and sierra is off the position will be flatten.
[2016-07-08 21:59:07]
Sierra Chart Engineering - Posts: 104368
Either the Target or Stop order is eventually going to fill. That is with certainty. Unless they are very far away from the current market price.
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