Support Board
Date/Time: Sun, 16 Mar 2025 21:28:41 +0000
Site search issue - Items not found + Persist Bool ?
View Count: 508
[2022-08-26 15:39:36] |
JohnR - User831573 - Posts: 320 |
In my trying to search to see the various type of persistent variable, I did 2 searches. sc.GetPersistent and GetPersistent Both came up -> No Results <-. But a google search of the same term, did find urls within SC. I knew there were some there, as I have used Int and Float, but were looking to see what the other possibilities were. Your docs state --> All of the basic data types that Sierra Chart works with are supported for persistent variables. Which leads me to my other item --> Why is there not a Bool option? There is Bool support within your Inputs, why not Get/Set PersistentBool? Thanks for your time to respond, JohnR Date Time Of Last Edit: 2022-08-26 15:41:57
|
![]() |
[2022-08-26 16:09:57] |
Sierra_Chart Engineering - Posts: 18799 |
You need to use the persistent functions for Integers. That will work. The bool datatype is not used within ACSIL anywhere. Not even with Inputs. Only integers. 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, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2022-08-28 03:28:00] |
Trader_Rob - Posts: 18 |
you can use the static keyword when initializing your variable. static bool bMyBool = false; Just set the variable to its original value when sc.LastCallToFunction is called, unless you want to use new and delete to manage your memory. |
[2022-08-28 06:34:02] |
Sierra_Chart Engineering - Posts: 18799 |
In general we do not recommend the use of static variables because there is just one instance per DLL and conflicts definitely arise when using multiple instances of the study. Please do not do this. You will run into problems later on which will lead to confusion.
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, use 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: