Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 00:19:04 +0000



[Programming Help] - Resync of charts not working as previous (Kiwi's resync study)

View Count: 1283

[2018-09-04 11:01:05]
samual sprat - Posts: 343
Hi,

I've been using kiwi's resync study for a while now and it's been working well after updating it with 'FreeDLL=0'. However in one of the release over past couple of months it's stopped working as expected and no longer refreshes the studies on the chart. I believe it's doing something because if I scroll back to old data on the chart then at the defined interval in the study (e.g. 60 seconds) the chart will jump back to current data, but the studies are not refreshed any longer. Any idea what the problem is?

Sorry to post this direct to support, but I'm not sure if this is broken because of a change or if the code needs to address different modules now, so any help appreciated. I've recompiled it using build 1795 and still have same issue

Also. Is this a functionality which could be added natively to sierra with option to enable/disable in settings, it's only a couple of lines long?

#include "sierrachart.h"
SCDLLName("* Kiwi's Stuff 2015 *")


/*==========================================================================*/
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.UpdateAlways=1;
sc.FreeDLL = 0;
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;
}
}
else
sc.Subgraph[0][sc.ArraySize-1] = 0;
}

Thanks
Sunny
[2018-09-10 08:34:12]
samual sprat - Posts: 343
Anyone any idea on this? Thanks
[2018-09-20 01:19:12]
Kiwi - Posts: 372
I didn't see this sorry. I'll have a look at it and give you some new code if that's what's required.
[2018-09-20 07:24:23]
samual sprat - Posts: 343
Great news - thanks mate!
[2018-09-30 11:34:51]
samual sprat - Posts: 343
Thanks Kiwi it's sorted the issue when using the switch to reload chart data

In case anyone is after the solution to this, see this thread...

Kiwi Resync Study - Memory leak?

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

Login

Login Page - Create Account