Login Page - Create Account

Support Board


Date/Time: Sun, 12 May 2024 10:48:41 +0000



ACSIL: sc.SetDefaults and sc.TickSize

View Count: 1096

[2020-09-29 06:00:42]
BrMa - Posts: 77
Dear ladies and gentlemen,

I'd like to do some initialization in the sc.SetDefaults-section using sc.TickSize.
When doing so, sc.TickSize returns a wrong value - using sc.TickSize later on in the code returns the correct figure.
However - sc.UserName() for example, seems to work without any issues in the sc.SetDefaults-section...

Question: is there a possibilty to get the correct ticksize in the sc.SetDefaults-section?

I'd like to provide you with an example so that you can reproduce the issue:
Symbol F.US.FDXMZ20 returns 0.01 for the ticksize in the sc.SetDefaults-section (which is wrong) and 1 later on (which is right)
[2020-09-30 05:24:25]
Sierra_Chart Engineering - Posts: 14319
This is definitely not making sense to us. This could not be.

It sounds like you might be using this option:
Chart Settings: Auto Set from Data Feed (Chart >> Chart Settings >> Symbol >> Symbol Settings menu)

Also make sure you are running the current version of Sierra Chart.
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
[2020-09-30 07:35:45]
BrMa - Posts: 77
Dear ladies and gentlemen,

I'm running version 2175 of SierraChart and I was able to narrow down the issue - I wrote this simple program to see if there is an issue:
SCSFExport scsf_TickSize(SCStudyInterfaceRef sc) {
  const std::string studyName = "TickSize";
  const int studyVersion = 1;

  std::ofstream debugFile;
  debugFile.open("C:\\TickSize.txt", std::ios::out | std::ios::app);

  if (sc.SetDefaults) {
    sc.AutoLoop = 0;
    sc.GraphName = studyName.c_str();
    sc.StudyVersion = studyVersion;

    debugFile << "TickSize (setDefaults): " << sc.TickSize << "\n";
    debugFile.close();

    return;
  }

  if ((sc.IsFullRecalculation) && (sc.UpdateStartIndex == 0)) {        // Execute on the first index only
    debugFile << "TickSize (Index-Zero): " << sc.TickSize << "\n";
  }
  debugFile.close();
}

I'm doing all the tests for the symbol F.US.FDXMZ20 - ticksize should be 1 for this symbol.

If I'm clicking on "Add custom study" in the Chart Studies dialog,
TickSize (setDefaults): 0
is written to the file (which is incorrect, but not an issue as setDefaults is called another time, when the study is applied).

When the study is applied, the following is appended to the file (which is correct!):
TickSize (setDefaults): 1
TickSize (Index-Zero): 1

If the chartbook is saved and closed, the re-open of the chartbook adds the following to the file:
TickSize (setDefaults): 0.01
TickSize (Index-Zero): 1

And here is the issue!
To be precise: if the study above is saved into a chartbook, the re-open provides a wrong value for the ticksize in the setDefaults-section!
Could you please look into this?
Date Time Of Last Edit: 2020-09-30 10:09:04
[2020-10-05 04:46:33]
BrMa - Posts: 77
Dear Sierra Chart Support,

could you please provide a status or a comment on that?
Thank you!
[2020-10-05 06:45:29]
Sierra Chart Engineering - Posts: 104368
There is complex dependencies related to studies during the loading of a Chartbook.

We will solve this particular case in the next release.
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-10-05 06:45:47

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

Login

Login Page - Create Account