Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 01:54:32 +0000



Post From: Kiwi Resync Study - Memory leak?

[2018-09-29 22:38:16]
Kiwi - Posts: 375
I'm not sure why you're using the study (it should only be needed if you have a dll that isn't really operating correctly) however here is an updated kiwi15 compiled with 1809 (32bit) and 1812 (64bit) using Sierra Chart's remote compiler.

I added an extra feature, the option to reload the data file if you want (set to No if you don't) in case there was an issue in that area:



/*==========================================================================*/
SCSFExport scsf_RecalcChart(SCStudyInterfaceRef sc) {
  if (sc.SetDefaults) {
    sc.GraphName = "Recalc";
    sc.StudyDescription = "Recalc Chart every x secs based on real time";
    sc.Subgraph[0].Name = "Strobe";
    sc.Subgraph[1].Name = "Time";
    sc.Subgraph[0].DrawStyle=DRAWSTYLE_IGNORE;
    sc.Subgraph[1].DrawStyle=DRAWSTYLE_IGNORE;
    sc.Input[0].Name="Seconds between recalcs";
    sc.Input[0].SetInt(60);
    sc.Input[1].Name="Also reload chart data";
    sc.Input[1].SetYesNo(0);

sc.UpdateAlways=1;
sc.FreeDLL = 1;
    return;
  }

  if (sc.CurrentSystemDateTime.GetTime() % sc.Input[0].GetInt() == 0) {
    if (sc.Subgraph[0][sc.ArraySize-1] < 999660) {
      sc.Subgraph[0][sc.ArraySize-1] = 999666;
      sc.Subgraph[1][sc.ArraySize-1] = sc.CurrentSystemDateTime.GetTime();
      sc.FlagFullRecalculate = 1;
      if (sc.Input[1].GetYesNo()) sc.FlagToReloadChartData = 1;
}
else
sc.Subgraph[0][sc.ArraySize-1] = 0;
}
}

Date Time Of Last Edit: 2018-09-29 22:39:59
attachmentkiwi15.cpp - Attached On 2018-09-29 22:37:02 UTC - Size: 15.62 KB - 591 views
attachmentkiwi15.dll - Attached On 2018-09-29 22:37:22 UTC - Size: 832.5 KB - 570 views
attachmentkiwi15_64.dll - Attached On 2018-09-29 22:37:39 UTC - Size: 862.5 KB - 582 views