Login Page - Create Account

Support Board


Date/Time: Tue, 04 Mar 2025 21:23:22 +0000



Updating Broke Code

View Count: 760

[2021-12-29 13:21:31]
User462086 - Posts: 196
After performing an upgrade from v2328 to v2339 earlier today, a couple of 'sc' calls no longer worked in otherwise stable code (in use every day for over a year). The custom study was also compiled in 2339 to no avail.

"sc.CurrentSystemDateTime" returned something that was not recognizable as a date.

"sc.GetStartOfPeriodForDateTime" generated a CPU exception.

These are the 2 that I tracked down before deciding to roll back to 2328. There could be others.

Rolling back to 2328 & compiling the study in that version restored prior functionality.

How can I upgrade without experiencing these issues?

Many thanks!!
[2021-12-29 13:36:25]
Sierra Chart Engineering - Posts: 104368
This makes completely no sense to us. There were no changes between these versions regarding those functions or members.

You need to look at the problem on your side and resolve. We have no idea what is going on in your case.
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: 2021-12-29 13:36:37
[2021-12-29 13:48:08]
User462086 - Posts: 196
That's useful information. Thank you for the speedy reply.
[2021-12-29 14:41:22]
1+1=10 - Posts: 270
Hi SC Support,

I had previously stated a separate thread detailing that on V2339, sc.NewTradingDay(sc.Index) was re-writing the sc.BaseDateTimeIn of bars it was called on: sc.IsNewTradingDay( anyBarIdx ) rewrites sc.BaseDateTimeIn[anyBarIdx] to SessionStartTime

I created a custom study file with only a sc.NewTradingDay(sc.Index) call and I'm experiencing the same issue. I have the code below but I also created a 1.5 minutes screen recording. I truly think some bug is affecting some set of the ACSIL time-related functionality:
https://youtu.be/2WyvWbaXrNc


#include "sierrachart.h"
SCDLLName("My Studies")

SCSFExport scsf_Test(SCStudyInterfaceRef sc)
{
if (sc.SetDefaults)
{
sc.GraphName = "Test";
sc.AutoLoop = 1;

}

sc.IsNewTradingDay(sc.Index);
}

[2021-12-29 23:01:44]
Sierra_Chart Engineering - Posts: 18654
One thing we immediately noticed in your video is the custom study is built for version 2308. There should not be a problem with the header file for that particular version and if there is it is a concern, but build it for the current version and see if the issue goes away.

We think we may have identified the issue. It is possible that when using Remote Build that _WIN64 is not defined. And in newer versions of Sierra Chart this does change one data structure. Why this is causing an issue is not clear. However, if that data structure changed it would cause various issues.

At this point the only solution is to rebuild for the latest version and you should not have a problem going forward.
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: 2021-12-29 23:04:25
[2021-12-29 23:15:02]
Sierra_Chart Engineering - Posts: 18654
We determined this is not the issue:

We think we may have identified the issue. It is possible that when using Remote Build that _WIN64 is not defined. And in newer versions of Sierra Chart this does change one data structure. Why this is causing an issue is not clear. However, if that data structure changed it would cause various issues.

_WIN64 is defined for a remote build.
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
[2021-12-30 00:10:54]
1+1=10 - Posts: 270
Hi SC Engineering,

Thanks for your attention to this matter! For me personally, it is not affecting my trading and I was able to code around it using other ACSIL time-related functions: sc.GetTradingDayDate(), for instance, is working fine.

I have been using "Remote Build" only since that functionally existed, although I could build through Visual Studio if it would help. Regarding the study being built on v2308, I thought that maybe somehow a file in my SC installation got corrupted, so I deleted the SC installation and downloaded a clean version. Only afterwards, while testing to see if it fixed the issue I noticed on the "Add Study" window where the study's version is listed. It appears that even in my newly downloaded SC version that the "SC Custom Studies & Examples" as well as the "User Contributed Studies" are also on v2308.

I'm not quite sure how to build with a different version. The only information I could find in the documentation that was kind of related was: https://www.sierrachart.com/index.php?page=doc/AdvancedCustomStudyInterfaceAndLanguage.php#CustomStudyDLLFileName.

I'm happy to help any way I can.
[2021-12-30 02:44:52]
Sierra Chart Engineering - Posts: 104368
We realize now, the version 2308 is referring to the version of the ACSIL header files. This was the last Sierra Chart version that these header files changed at. So that version is perfectly fine. We apologize for believing it was an issue.


So version 2308 is fine. That is up-to-date. There definitely is not a problem with sc.IsNewTradingDay itself. That function could not be causing any issue.

The issue is reproducible on the remote build and we see why it is happening.

The remote build compiler is having trouble with some changes to SCDateTime. We will resolve 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: 2021-12-30 02:45:51
[2021-12-30 14:46:20]
Sierra Chart Engineering - Posts: 104368
There were very minor non-breaking changes to SCDateTime but the GCC compiler (Used by remote build), must be interpreting the size of that object ddifferently or handling it differently for an unknown reason as compared to Visual C++. We will revert these changes and put out a new release in about 30 minutes.
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: 2021-12-30 14:46:28
[2021-12-30 15:55:49]
1+1=10 - Posts: 270
Thanks SC Engineering. Great support as always!

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

Login

Login Page - Create Account