Login Page - Create Account

Support Board


Date/Time: Thu, 23 Jan 2025 05:08:38 +0000



sc.PersistVars ERROR

View Count: 1380

[2018-11-01 16:57:17]
User114959 - Posts: 10
Attempting to Rebuild custom function with no coding changes and receive the error:

In Function 'void scsf_DPMR(SCStudyInterfaceRef)':
DPMRNQ.cpp:85:25: error: 'struct s_sc' has no member named 'PersistVars'
double& avgRange = sc.PersistVars->Doubles[0];

Receive this error for each line using PersistVar.

This only starting occurring since the download of the most recent release update.

Please advise

Thank you
[2018-11-01 18:04:35]
Sierra Chart Engineering - Posts: 104368
You need to use the newer persistent variable functions instead:

sc.GetPersistentInt()



Example:
double& avgRange = sc.GetPersistentDouble(1);

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
Date Time Of Last Edit: 2018-11-01 18:07:13
[2018-11-01 18:07:19]
Sierra Chart Engineering - Posts: 104368
The prior post has been updated with an example.
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
[2018-11-01 19:07:41]
User114959 - Posts: 10
Thank you for the quick response! That did the trick!
[2018-11-19 08:52:33]
User88 - Posts: 40
The example below still uses the old method.
ACSIL Programming Concepts: One Time Processing per Bar in the Chart

Doc needs updating.
[2018-11-19 10:13:15]
Sierra Chart Engineering - Posts: 104368
We will do this now.
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

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

Login

Login Page - Create Account