Login Page - Create Account

Support Board


Date/Time: Fri, 19 Sep 2025 11:39:32 +0000



ACSIL: Formated AddMessageToLog crash or freeze SC

View Count: 1124

[2019-02-28 13:56:53]
TedMar - Posts: 191
Sorry guys, but i not understand why Simple Message log format freezze SC?

Example

SCSFExport scsf_ManualLoopExample(SCStudyInterfaceRef sc)
{
  if (sc.SetDefaults)
  {

    sc.GraphName = "Manual Loop Example";
    sc.StudyDescription = "This is an example of using manual looping. It also demonstrates the new method to use analysis functions within a for loop.";
    sc.AutoLoop = 0; // 0 is the default: there is no auto-looping

    return;
  }
  
  SCString message;
message.Format("LastPrice f%", sc.BaseDataIn[SC_LAST][sc.ArraySize - 1]);
sc.AddMessageToLog(message, 1);

}

After add this study, SC freezze or crashed


v1880
[2019-02-28 18:27:30]
Sierra Chart Engineering - Posts: 104368
That code is wrong. Change it to this:

message.Format("LastPrice %f", sc.BaseDataIn[SC_LAST][sc.ArraySize - 1]);

And the study must use manual looping to avoid too many messages from being added to the log which we can see is the case. But make certain that it is indeed actually manual looping by recompiling the code.
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: 2019-02-28 18:28:12
[2019-02-28 18:55:13]
TedMar - Posts: 191
ohh my good , in fact , the "%" on wrong site from character ....i dont now why i do not see them.
Thank you

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

Login

Login Page - Create Account