Support Board
Date/Time: Tue, 11 Mar 2025 00:58:07 +0000
SCTRADING_ORDER_ERROR in v2368 but not prior version
View Count: 977
[2022-03-16 03:22:49] |
jwick - Posts: 142 |
Hi ... I just upgraded from v2308 to 2368. Immediately after the upgrade, my (some not all) sc.BuyEntry and sc.SellEntry orders are returning -1 (no change in code or chartbooks). When I look at my service logs, I see no details on the reason for the error. When running the same chartbook / code in v2368, there are no errors. This is being run on a sub-instance in a chart replay (multiple charts) on back adjusted futures charts. I have attached my trade service log (altered the logs by removing my account number). I have noticed between the two SC versions, the compiler itself seems to be different (based on the output when compiling). |
Private File |
[2022-03-16 04:02:40] |
jwick - Posts: 142 |
Adding more mystery, looking at the Trade Activity Log, I notice this (see attached). Now, order ID 25801505 (above) is indeed the ID set when calling sc.BuyEntry() even though on that very call to BuyEntry, I am being returned -1. And looking at the trade activity log above, the order is created and then immediately cancelled. Again, I do not observe this behavior in v2308. Date Time Of Last Edit: 2022-03-16 04:03:47
|
Attachment Deleted. Private File |
[2022-03-17 13:31:38] |
|
Your automated trading system is canceling the order: Orders 2008-06-01 18:09:00.000010 2008-06-01 18:09:00.000000 [Sim]NQ-202203-GLOBEX Auto-trade canceled order: Replay 200000X: NQ-202203-GLOBEX [CB] 3 Min #3 | TimeCompressionA 25801505 25801505 Stop 7 Buy 2077.00 Pending Cancel Sim1 Open Entry, Standard entry signal 0.00 Good till Canceled
We do not know why this is the case and this is not reproducible: my (some not all) sc.BuyEntry and sc.SellEntry orders are returning -1 (no change in code or chartbooks). You need to analyze what is happening. We simply do not know. If something has changed which is affecting your trading system we do not know what it is at all.However if -1 is returned, there definitely should be a message in the Trade >> Trade Service Log. So we can help with this issue. If you provide us code which demonstrates this we will figure out the problem. 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 |
[2022-03-19 18:37:48] |
jwick - Posts: 142 |
Thanks! I appreciate that. I've created a sample chartbook and example code (attached). The code itself just sends a buy order when the date changes and a sell order at 1530). When running this chartbook / code in v2308 BuyEntry / SellEntry never return a negative number but v2368 returns -1 (on buyentry / sellentry) (without any message in the trade service log) and generates different order fills. My replay settings: All charts in chartbook (even though there's only one chart). Accurate system backtest. 90 second bar interval. Also note, the chartbook was made in v2368. When you open it in v2308, you have to manually set the bar period back to 3 minutes (it defaults down to 1 second since I think chartbooks made in v2368 are not backwards compatible). Date Time Of Last Edit: 2022-03-19 18:39:42
|
Private File Private File |
[2022-03-23 01:44:30] |
Sierra_Chart Engineering - Posts: 18738 |
Also note, the chartbook was made in v2368. When you open it in v2308, you have to manually set the bar period back to 3 minutes (it defaults down to 1 second since I think chartbooks made in v2368 are not backwards compatible). 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, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2022-03-23 02:20:40] |
Sierra_Chart Engineering - Posts: 18738 |
We have identified two problems. One issue in your code and another issue within Sierra Chart where if an order is successfully submitted, there was an error indicated which was not correct. Version 2374 has been released which resolves both of these. The problem in your code was that you were rounding the unset Price2 member variable in the new order structure. In the newest version, this causes no issue. Previously it would cause an invalid value to have been set into that variable. 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, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2022-03-23 08:55:40
|
[2022-03-23 14:41:03] |
jwick - Posts: 142 |
Oh that's so wonderful! Thanks so much for the quick turnaround and pointing out the unset Price2 issue in my code I posted. By sheer luck in my actual production code I've been setting Price2 but I didn't actually think about / account for if my function is called without a Price2 explicitly set in s_SCNewOrder. I'll add an explicit flag to control rounding Price2 to my function. I'll update to 2374 by this weekend and report back / confirm that everything is working a-ok. Thanks again! |
[2022-03-29 23:17:34] |
jwick - Posts: 142 |
Hi ... I can confirm the previously discussed issue has gone in 2374. However, I have noticed an issue with the new back adjustment (on settlement vs open prices) Regardless of the back adjustment anchor, the difference between the prices from one bar to the other should remain the same (since the adjustment is a +/- offset on all prices). However, in the attached screenshot, I have a 1 bar ROC against bar low's. Here you can see on the same bar, it produces different results (when the difference between bar lows should remain constant whether back adjusting using settlement price vs open price at rollover). I'm also finding the difference between the versions isn't consistent. Sometimes the low to low difference is the same between versions and sometimes it's not (as in the screenshot). In addition to the screenshot I've attached the chartbooks used to make those screenshots (one for each SC version). The specific date in the screenshot is 2008-09-10. Both SC versions are using the same data / trade settings / data resolution (1 second). EDIT: I'm also going to run a test this weekend by manually copying over the data (scid / dly files) from the sub-instance running the old version into the sub-instance running the new version and verify if I'm observing the same behavior. Date Time Of Last Edit: 2022-03-29 23:33:32
|
Private File Private File Private File |
[2022-03-30 00:57:51] |
|
One thing we are 100% certain of, is there is no problem with the Continuous Futures Contract functionality. We recommend fully re-downloading the data for all contract months: Continuous Futures Contract Charts: Re-Downloading Continuous Futures Contract Data the difference between the prices from one bar to the other should remain the same (since the adjustment is a +/- offset on all prices). We do not understand this. Within the same chart? Comparing different charts? Within the same chart, there will be price differences between bars. And the back adjustment amounts, will also be different, with settlement prices.We are really are not understanding this. We are not going to examine the Chartbooks. The functionality definitely works correctly. Nothing has changed with it other than using settlement prices. Do further research, you are going to see there is not a problem. 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: 2022-03-30 00:58:34
|
[2022-03-30 03:45:16] |
jwick - Posts: 142 |
Apologies for the confusion. I'm comparing the same chart but loaded in two different versions of SC. v2308 and v2374. As far as what I'm comparing, I can't directly compare the prices because v2374 uses a different method of back adjustment (introduced in v2346). So, I'm comparing 1-bar ROC in order to compare apples to apples. Doing so should be yielding the same result between the two versions but isn't on some bars. I'll re-download the data on both versions and test again this weekend. Date Time Of Last Edit: 2022-03-30 03:45:43
|
[2022-04-03 14:21:21] |
jwick - Posts: 142 |
Hi ... I have done two additional tests now ... fully re-downloading the data files in both SC versions and a second test copying over the data files from one to the other to make doubly sure they are working off the same data. However, I observed the same anomaly documented above. At this point I'm quite confident something in v2376 is causing certain data bars to load differently from 2308. If my explanation of why the ROC should be the same across the two versions makes sense to you, I urge you to load the two chartbooks and compare the date highlighted (it does occur on other bars as well) from one version to the other. Perhaps my conjecture that it has to do with continuous contracts is wrong. The only reason I started thinking about that was I had to account for the change in back adjustments (hence the use of ROC to compare bars) when comparing if the data is loaded the same across the two versions. But something else is then causing this discrepancy. Looking closer at the bar, I have noticed the actual range of that bar on the two versions is identical. So it appears as though for some reason the opening print (and the HLC prints as well) is offset by more than would be accounted for by the difference in back adjust amount. Why this happens on just some bars and not all is perhaps the biggest mystery to me. |
[2022-04-05 10:53:34] |
|
We apologize for the delay. There is a structured way of analyzing this and will prepare documentation for how to go through 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 |
[2022-04-05 13:20:36] |
jwick - Posts: 142 |
No worries ... appreciate the update that you're looking into it and look forward to hearing the conclusions. Also, no rush ... I'm still running v2308 without issue ... just aiming to periodically stay up to date and upgrade to the latest versions.
|
[2022-04-17 23:54:56] |
jwick - Posts: 142 |
Hi! Is there any update on this? I tested it again on the latest v2383 and am observing the same discrepancy as previously documented.
|
[2022-04-18 11:28:06] |
|
We do not see how there can be any problem with the back adjustment amounts and we created this detailed documentation here for you to verify that: Continuous Futures Contract Charts: Verifying Correct Back Adjustment Amounts The way that you are going about determining this is not a way in which to verify this. And is not a way, that we would analyze 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 |
[2022-04-18 13:08:04] |
jwick - Posts: 142 |
Hi ... To clarify, I am not sure that back adjustments is the cause of the discrepancy ... it was just a theory I was proposing. It could be some unrelated reason. I urge you to still load the chartbooks I posted to verify that you are also observing the difference in ROC on the chart date between the two SC versions. If you do observe it, then I believe there is indeed an issue somewhere (maybe not with back adjustments) since the rate of change from one bar to another should remain constant from one SC version to another.
|
[2022-04-18 13:16:00] |
|
Is the Rate of Change study not working correctly? It is documented here and it is extremely simple for you to verify: Rate of Change - Points We do not need to look at different versions and we do not need to look at any Chartbooks. 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 |
[2022-04-18 13:25:22] |
jwick - Posts: 142 |
The RoC study is working correctly. On that specific day I highlighted, I also manually verified that the difference between the close of the prior (2008-09-09) bar to the open of the next bar (2008-09-10) is different on v2308 and v2368. Likewise the difference between the bar lows and the difference between the bar highs is not the same on the two versions.
|
[2022-04-18 13:39:54] |
|
That can be if those two dates, are for different symbols. In other words for a different contract month and year.
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 |
[2022-04-18 15:25:03] |
jwick - Posts: 142 |
Oh that's so interesting!! I think this is it :) What a great observation / pointer! This seems likely since 09/10 is indeed a rollover date on the NQ. Can I ask another clarifying question to verify that I'm understanding the implications of the new rollover procedure? Since in the newer versions, the prior day's settlement price is used instead of the current day's opening price, does that mean between the old and the new version, there is specifically one day for each rollover where each version will use data from a different contract month (so I'm guessing in older versions, the day on the rollover (09/10) will use data from the old contract month (since the new contracts opening print isn't processed till the day is over) while in the newer version, the day on the rollover will use data from the new contract month since the prior day's settlement price is already known as of that day)? |
[2022-04-21 22:24:37] |
Sierra_Chart Engineering - Posts: 18738 |
We apologize for the delay . The answer to this is no: does that mean between the old and the new version, there is specifically one day for each rollover where each version will use data from a different contract month
The same contract month is used. The settlement price from the day before, in the same contract month is used. So the settlement, from the prior contract and the settlement for the new contract. 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, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2022-04-21 22:24:55
|
[2022-04-24 20:45:47] |
jwick - Posts: 142 |
Hi. Thanks for your reply. In that case, I still do not understand how the rate of change differs between SC versions? These differences / not understanding what is causing them is currently preventing me from being able to upgrade to the latest SC version for fear that I am working on wrong data (either the new version of SC are loading data incorrectly or (hopefully not!) the older versions of SC were). Unless I am missing something, they are indeed loading data differently (it seems specifically at the rollover day). If both SC versions are using the same underlying contract month / symbol, why would the difference between two consecutive bar lows ever differ when comparing one SC version to the other? |
To post a message in this thread, you need to log in with your Sierra Chart account: