Support Board
Date/Time: Sun, 19 Jan 2025 12:24:47 +0000
Post From: 64 Bit performance
[2018-04-04 01:51:55] |
Sierra Chart Engineering - Posts: 104368 |
We did not believe there was any problem with these functions and we verified there is not. Here is an example: SCSFExport scsf_GetStudyPersistentVariableFromChartExample(SCStudyInterfaceRef sc)
{ SCInputRef ChartStudyReference = sc.Input[0]; if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "Get Study Persistent Variable from Chart Example"; sc.AutoLoop = 1; sc.FreeDLL = 0; ChartStudyReference.Name = "Chart Study Reference"; ChartStudyReference.SetChartStudyValues(1, 0); return; } //Set persistent float variable with a value of 100 using integer key 1. float& r_PersistentFloat = sc.GetPersistentFloat(1); r_PersistentFloat = 100; // Get a reference to a persistent variable with key value 1 in the chart // and study specified by the "Chart Study Reference" input. Assuming the // "Chart Study Reference" input is referencing this particular chart and // study instance, then this function will return 100. const float PersistentValue = sc.GetStudyPersistentFloatFromChartStudy(ChartStudyReference.GetChartNumber(), ChartStudyReference.GetStudyID(), 1); if (sc.Index == sc.ArraySize - 1) { SCString OutputText; OutputText.Format("%f", PersistentValue); sc.AddMessageToLog(OutputText, 0); } } 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 |