Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 07:29:48 +0000



Post From: Bug in sc.BaseData during replay?

[2019-11-18 13:27:52]
BrMa - Posts: 77
Believe me I'd be happy to be proven wrong - but another very simple test shows the following:
I put together the following testing routine:

SCSFExport scsf_TestIndex(SCStudyInterfaceRef sc) {
  if (sc.SetDefaults) {
    sc.GraphName = "TestIndex";
  } else if (!sc.IsFullRecalculation) {
    float highPrice, lastPrice, debuggerStopLine;
    for (int index = sc.UpdateStartIndex; index < sc.ArraySize; index++) {
      highPrice = sc.BaseData[SC_HIGH][index];
      lastPrice = sc.BaseData[SC_LAST][index];

      debuggerStopLine = 0;
    }
  }
}
I also made sure, I'm not using Renko bars or anything else, opened a plain chart with the settings attached in the file ChartSettings.jpg and added the study outlined above to the chart. Debugger-1.jpg shows the debug information before the error occurs - please see the high and the last value both being at 11990 what is perfectly fine. With the next iteration (please see Debugger-2.jpg) the high is 11992 and the last value 11991.
Please also note the index stays unchanged - so no new bar!

Could the issue occur because of manual looping?
I don't wanna bother you but this is a serious issue!

Thank you for your help!
Btw: I'm using version 2011 of Sierra Chart.
imageChartSettings.jpg / V - Attached On 2019-11-18 13:12:53 UTC - Size: 176.4 KB - 276 views
imageDebugger-1.jpg / V - Attached On 2019-11-18 13:15:54 UTC - Size: 126.39 KB - 286 views
imageDebugger-2.jpg / V - Attached On 2019-11-18 13:16:00 UTC - Size: 130.25 KB - 280 views