Login Page - Create Account

Support Board


Date/Time: Thu, 18 Apr 2024 20:52:27 +0000



ACSIL question: issue with sc.Input[] and sc.Subgraph[]

View Count: 580

[2020-03-22 09:33:04]
BrMa - Posts: 77
Dear ladies and gentlemen,

I have an issue with sc.Input[] and sc.Subgraph[] - as the issue is the same with both, I'll only describe the issue for sc.Input[] in detail.
I created a study with 18 sc.input[] fields, following your guidelines (three points "..." in the source code mean, I removed lines for a better readability):


SCSFExport scsf_Test(SCStudyInterfaceRef sc) {
  ...
  SCInputRef input12 = sc.Input[12];
  SCInputRef input13 = sc.Input[13];
  SCInputRef input14 = sc.Input[14];
  ...

  if (sc.SetDefaults) {
  ...
    input12.Name = "Input 12";
    input12.SetYesNo(0);

    input13.Name = "Input 13";
    input13.SetYesNo(1);

    input14.Name = "Input 14";
    input14.SetYesNo(1);
  ...
  return;
  }
...
}

I made sure input0 to input17 are defined and there is no missing index on sc.Input[index].
My issue is as follows: all inputs besides index 13 are initialized perfectly fine, input 13 contains weird information.

I'm aware this sounds impossible but when I debug the code and start debugging at the line where the definiton of defaults starts (Line: if (sc.SetDefaults)) - so no processing of the study has been done yet, only the definition of fields - I receive the information in the debug window documented in the attached files Input12.jpg to Input14.jpg.
Based on this information, input 12 and 14 (like all others) seem to be initialized correctly where input 13 was not.

Regardless what is being captured in input13, it does not return the information captured in the configuration window.
I do have exactly the same issue with sc.Subgraph[0] with 13 sc.Subgraphs definded - all others work perfectly fine - sc.Subgraph[0] does not return the information captured in the configuration window.
Can you please take a look into this?

If you need additional debug information or anything else please don't hesitate coming back to me!
Thanks a lot in advance!
imageInput12.jpg / V - Attached On 2020-03-22 08:45:12 UTC - Size: 171.33 KB - 187 views
imageInput13.jpg / V - Attached On 2020-03-22 08:45:21 UTC - Size: 185.96 KB - 235 views
imageInput14.jpg / V - Attached On 2020-03-22 08:45:28 UTC - Size: 173.73 KB - 177 views
[2020-03-22 11:25:56]
Sierra Chart Engineering - Posts: 104368
There must be some problem in your code from some custom study being used, causing the issue.

We recommend restarting Sierra Chart and just testing a simple study that just sets these Inputs and does nothing else and you should not see 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: 2020-03-22 20:19:11
[2020-03-22 13:25:46]
BrMa - Posts: 77
Thanks for the fast reply!

I resolved the issue and just like to mention the solution in case anybody else has the same issue during development:
I changed the "data type" of one of the inputs during development from storing a float at the beginning to finally storing a bool-value.

I forgot to remove the study from the chartbook and re-add it but just set the new value in the configuration dialog. This seems to cause the behaviour described before.
After removing the study and re-adding it, everything works fine.

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

Login

Login Page - Create Account