Support Board
Date/Time: Sun, 08 Sep 2024 00:26:09 +0000
s_SCNewOrder::MaximumChase
View Count: 1910
[2015-09-14 17:03:36] |
User35525 - Posts: 181 |
This code generates error: 615:14: error: 'struct s_SCNewOrder' has no member named 'MaximumChase' s_SCNewOrder NewOrder; NewOrder.OrderQuantity= size; NewOrder.OrderType= SCT_ORDERTYPE_LIMIT_CHASE; NewOrder.MaximumChase= Price + 8*sc.TickSize; Am I doing something wrong? Thanks. |
[2015-09-14 17:52:12] |
|
This is the correct name: MaximumChaseAsPrice
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 |
[2015-09-14 18:51:38] |
User35525 - Posts: 181 |
Thanks; is there a mispricing issue if using limit chase and ACSIL, and bracket OCO's at CTS? Please find attached my trade activity log (please see today's orders, 09-14). The successful orders used parent order type "SCT_LIMIT", but extremely large prices are seen when using the below chase code, so that price1=21474835.99 and price2=-21474835.99. int EnterBuyBracket(double Price, int size, SCStudyGraphRef sc) { s_SCNewOrder NewOrder; NewOrder.OrderQuantity= size; NewOrder.OrderType= SCT_ORDERTYPE_LIMIT_CHASE; NewOrder.MaximumChaseAsPrice= Price + 8*sc.TickSize; NewOrder.Target1Price= Price + 10*sc.TickSize; NewOrder.AttachedOrderTarget1Type= SCT_ORDERTYPE_MARKET_IF_TOUCHED; NewOrder.Stop1Price= Price - 8*sc.TickSize; NewOrder.AttachedOrderStop1Type= SCT_ORDERTYPE_STOP; int Result= sc.BuyEntry(NewOrder); if (Result > 0) return sc.Index; return -1; } and that was called with: int r= EnterBuyBracket(sc.Ask,1,sc); Note, at Global Settings --> General Trade Settings, "Adjust attached orders to maintain same offset on parent fill" is UNCHECKED, and "Use Server-side OCO and Bracket Orders" is CHECKED, which may both be necessary for server-side bracket OCO's so that SC doesn't try to manage the order quantity? Date Time Of Last Edit: 2015-09-14 19:25:03
|
Private File |
[2015-09-14 19:52:11] |
|
You need to do some more debugging on your side to determine the problem. One thing we see is you are not setting the order price for the Limit Chase order. It is zero. This line of code is also not correct: NewOrder.MaximumChaseAsPrice= Price + 8*sc.TickSize; You are not setting it correctly. Refer to the documentation for this structure member here: https://www.sierrachart.com/index.php?page=doc/doc_ACSILTrading.html 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: 2015-09-14 19:52:32
|
[2015-09-14 20:32:57] |
User35525 - Posts: 181 |
Thanks, I see that I mistakenly had removed "NewOrder.Price1 = Price", and with that it works now. I'm not sure what you meant by this line being incorrect: NewOrder.MaximumChaseAsPrice= Price + 8*sc.TickSize; The documentation says an absolute price is needed, and that sets an absolute price, beyond which it isn't to chase the market for a buy entry. I noticed that ORDERTYPE_MARKET_IF_TOUCHED is translated into a LIMIT order in CTS, but I don't know if that's normal since I've never tried to use CT4 to set a MIT order as my take-profit in an OCO. Date Time Of Last Edit: 2015-09-14 20:33:46
|
[2015-09-14 21:10:58] |
|
The documentation says an absolute price is needed, and that sets an absolute price, beyond which it isn't to chase the market for a buy entry. 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 |
[2015-09-14 21:20:11] |
User35525 - Posts: 181 |
Is this what you're referring to?: https://www.sierrachart.com/index.php?page=doc/doc_ACSILTrading.html#SCNewOrderMaximumChaseAsPrice When using a Limit Chase order type for the main order, not an Attached Order, this specifies the maximum chase amount.
Specify the maximum chase amount as an actual price value and not in Ticks. For example, if you want the maximum chase amount to be 2.0, then set this to 2.0. I'm using Limit Chase as my main parent order, so used an actual price with this: NewOrder.MaximumChaseAsPrice= Price + 8*sc.TickSize;
I'm trying to chase the market only 8 ticks max, so if I'm slipped by a large amount, I don't want to chase the market anymore. "Price" is the "sc.Ask" value that I passed-in.However in the trade window GUI, I see that it is supposed to be set using relative ticks: http://www.sierrachart.com/index.php?page=doc/doc_OrderTypes.html#LimitChase I'm sorry if that isn't what you were referring to, but I didn't notice anything else on the ACSILTrading.html page that I should have noted. Date Time Of Last Edit: 2015-09-14 21:27:18
|
[2015-09-14 21:26:19] |
|
So it says to use an actual price value but not an "Absolute" price. So it is meant to be a maximum chase amount as a price and not in ticks. We had thought that a low value of 2.0 in the example made that clear. We see where the confusion is, but we are not totally sure how to word this better. 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 |
[2015-09-14 21:36:12] |
User35525 - Posts: 181 |
Yes, "absolute" price isn't what I meant. If the docs are correct, then "actual" price is correct, so as to not confuse the mathematically-inclined. I see these options for a buy bracket: #1, pass in an actual price: NewOrder.MaximumChaseAsPrice= Price + 8*sc.TickSize;
or #2, pass in relative # ticks: NewOrder.MaximumChaseAsPrice= 8*sc.TickSize;
Option #1 was correct for a buy bracket, right? If I were selling, "Price - 8*sc.TickSize" is instead correct for option #1, right? Thanks for bearing with me. Date Time Of Last Edit: 2015-09-14 21:51:54
|
[2015-09-14 21:51:48] |
|
We think we have to remove the term "actual". This is what you need to use: NewOrder.MaximumChaseAsPrice= 8*sc.TickSize; 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 |
[2015-09-14 21:57:04] |
User35525 - Posts: 181 |
Thank you. Since that is simply number of ticks, I believe the docs could be written as: Specify the maximum chase number of ticks. For example, if you want the maximum chase amount to be 2 ticks, then set this to 2*sc.TickSize. Date Time Of Last Edit: 2015-09-14 22:03:26
|
[2015-09-14 22:00:35] |
|
We would not use the term "ticks" because in that particular case you would specify a value of 2, in this case, and not multiply by the tick size.
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 |
[2015-09-14 22:04:27] |
User35525 - Posts: 181 |
Sorry, I meant this: Specify the maximum chase point. For example, if you want the maximum chase point to be 2 ticks away, then set this to 2*sc.TickSize. Sorry this thread was so long, it can be closed. Date Time Of Last Edit: 2015-09-14 22:09:51
|
To post a message in this thread, you need to log in with your Sierra Chart account: