Support Board
Date/Time: Thu, 23 Jan 2025 22:42:30 +0000
Replay multiple charts in chartbook. Getting OrderstatusCode == SCT_OSC_UNSPECIFIED
View Count: 1370
[2017-05-30 02:09:35] |
@sstfrederik - Posts: 405 |
Hi, Iaw /ACS_Source/scconstants.h, the OrderStatusCode "should" never be 0 (SCT_OSC_UNSPECIFIED) but I do get it when running an auto strategy in replay. - running version 1545 - running replay for all charts in chartbook, 1 sec interval - Trade activity log says order was filled - no other issues in service log - when I trade a single chart in replay mode the OrderStatusCode == 8 (SCT_OSC_FILLED) Anything I can do, apart from using SCT_OSC_UNSPECIFIED as part of my condition? Kind regards, Frederik Date Time Of Last Edit: 2017-05-30 02:10:16
|
[2017-05-30 02:46:20] |
Sierra Chart Engineering - Posts: 104368 |
Actually what is happening is the default order structure is being returned, which means the order was never found because it was removed from the list. Check the return value of the function you are using. 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 |
[2017-05-30 09:48:13] |
@sstfrederik - Posts: 405 |
Chart: Replay 240.0X: ESM17 1.00 Range #8 | Study: AS Trading System | OrderStatusCode = 0, FillResult = -1 | 2017-05-30 05:45:11 * Nothing in the trade service log. The codesnippet is this: if(LongOrderExit == true){
s_SCTradeOrder TradeOrderData; FillResult = sc.GetOrderByOrderID(LongOrderID, TradeOrderData); OrderStatusCode = TradeOrderData.OrderStatusCode; SCString noot; noot.Format("OrderStatusCode = %d, FillResult = %d", OrderStatusCode, FillResult); sc.AddMessageToLog(noot,1); //if filled // added OSC_UNSPECIFIED to make it work with replaying all chartbooks// if (OrderStatusCode == SCT_OSC_FILLED || OrderStatusCode == SCT_OSC_UNSPECIFIED){ //reset some persistent values } |
[2017-05-30 17:57:42] |
Sierra Chart Engineering - Posts: 104368 |
A return value of -1 means the order was not found. Why this can happen during a back test is fully documented here: http://www.sierrachart.com/index.php?page=doc/ACSILTrading.html#GetOrderByOrderID 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: 2017-05-30 17:57:55
|
[2017-07-10 16:00:14] |
wwwingman - Posts: 185 |
I had the same problem for backtesting and needed to adjust the code for replay. If I understand correctly it means sierra deletes the filled orders on replay. Is it possible to avoid that in some way (user option ?) ? this is useful for backtesting semi automatically strategies. -- W |
[2017-07-10 16:30:40] |
@sstfrederik - Posts: 405 |
Change the replay mode to something else than accurate replay and it will not happen.
|
[2017-07-10 16:50:51] |
wwwingman - Posts: 185 |
Change the replay mode to something else than accurate replay and it will not happen.
No. I need precise replay. -- W. |
[2017-07-11 18:02:53] |
Sierra Chart Engineering - Posts: 104368 |
Is it possible to avoid that in some way (user option ?) ? this is useful for backtesting semi automatically strategies. 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: 2017-07-12 03:21:44
|
[2017-07-12 03:21:13] |
Sierra Chart Engineering - Posts: 104368 |
What we will try to do is keep the filled and canceled orders during a back test persistent for 30 seconds instead of immediately removed. Hopefully that will help.
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 |
[2017-07-12 06:11:32] |
Sierra Chart Engineering - Posts: 104368 |
We have not yet done any testing of the changes but we have implemented what is described in post #9 above.
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: 2017-07-12 06:11:50
|
[2017-07-12 06:19:06] |
wwwingman - Posts: 185 |
Thank you. FWIW : My goal is to have a behavior that is similar on live/sim/replay. By eliminating the orders automatically on tick replay it is impossible for me to know that an order was filled when using GetOrderByOrderID. I can obviously tweak (which is what I did..) to something like "if we are in replay mode and I get an error it means the order was filled" but you can see it is a bad approach. Maybe there are other ways to check my order got filled that I am not aware of... (but going to non precise replay is not an option..). -- W. |
[2017-07-12 06:55:19] |
Sierra Chart Engineering - Posts: 104368 |
We could add the capability to get all of the order fills for a particular Internal Order ID. We have something like this on the task list. 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: