Support Board
Date/Time: Sun, 08 Sep 2024 01:36:48 +0000
SCDateTime vs SCDateTimeMS in Persistent Variables
View Count: 1333
[2015-09-25 04:05:42] |
CustomIndicators - Posts: 126 |
Heya SC Engineers, I've got a quick question for ya. I record pivot point SCDateTimes for later reference, in Persistent Variables. As I now realize that I actually need to have millisecond data in there as well, I tried to see if I could use SCDateTimeMS as a persistent variable. It was giving me errors when I tried to do that. If I pull the SCDateTimeMS, will it be possible for me to stuff that into the SCDateTime persistent variables, to make sure I'm getting the correct candle in later calculations? Is there a way to easily pull the candle's index from a SCDateTimeMS? Hopefully I am describing my question well enough. I hope to hear from you soon! |
[2015-09-25 04:45:34] |
|
If I pull the SCDateTimeMS, will it be possible for me to stuff that into the SCDateTime persistent variables,
Yes this will work. Just assign it to a SCDateTime when setting it into the persistent variable and assign it back to a SCDateTimeMS after getting it out of the persistent variable.There are functions for getting a bar index from a Date-Time. They are documented here: https://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Functions.html 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 |
[2015-09-25 14:59:23] |
CustomIndicators - Posts: 126 |
Sounds great. So, when it comes to getting the index, is the parameter located at peakTwoDT in my following code able to use SCDateTime and SCDateTimeMS interchangably, SCDateTimeMS giving me a more precise answer based on the MS? sc.GetContainingIndexForSCDateTime(sc.ChartNumber, peakTwoDT)
|
[2015-09-27 09:12:22] |
|
We have looked into this, and we see a minor problem with how the comparison is being done. It is being done using a standard double rather than one of the SCDateTime and SCDateTimeMS types. With the way it works now, there is a slight amount of imprecision. This will be solved in the next release and it will always use SCDateTimeMS. So you can pass in either. 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: 2015-09-27 09:21:40
|
[2015-09-27 16:44:23] |
CustomIndicators - Posts: 126 |
Awesome, thank you! I'll be watching for that update. :)
|
To post a message in this thread, you need to log in with your Sierra Chart account: