Support Board
Date/Time: Sat, 28 Dec 2024 09:35:03 +0000
Post From: Unexepected values in GetPersistent when using sc.MaintainVolumeAtPriceData
[2016-04-15 18:19:17] |
Sierra Chart Engineering - Posts: 104368 |
Yes, we were able to duplicate this but the code is not written properly to begin with. We made the following changes: SCSFExport scsf_PersistTest(SCStudyInterfaceRef sc)
{ static int nb=0; if (sc.SetDefaults) { sc.GraphName = "Persistent test"; sc.AutoLoop = 1; sc.FreeDLL = 0; sc.MaintainVolumeAtPriceData = 1; return; } SCString Buffer; if (sc.Index == 0) { sc.AddMessageToLog("Begin Proc",1); int& i=sc.GetPersistentInt(0); Buffer.Format("Current persistent : %d", i); sc.AddMessageToLog(Buffer,1); i++; Buffer.Format("Persistent is now : %d", i); sc.AddMessageToLog(Buffer,1); sc.AddMessageToLog("End Proc",1); } return; } 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 |