Support Board
Date/Time: Mon, 23 Dec 2024 01:04:11 +0000
Questions about sc.GetChartName and sc.OpenChartOrGetChartReference
View Count: 916
[2015-05-27 14:25:08] |
GmA - Posts: 20 |
Dear Support Board! There is a custom study what opens few charts by sc.OpenChartOrGetChartReference function using the name of the instrument from the chart where the study is set. If this study will be loaded to the chart with expired instrument (let's say CLM5) and if in the Global Symbol settings the rollover rules of that instrument are not set to "Not Defined", then the charts will be open with already rolled over instruments (let's say CLN5). Here are the questions : 1. Is that really correct behavior? sc.OpenChartOrGetChartReference returns correct chart number, and you can work with it, but if the chart will be restarted, then those newly opened charts can not be found (due to the difference in the name) and another ones will be opened again. Such behavior can cause non-stop chart loading as whenever the chart with study will be tagged for reload/recalculation sc.OpenChartOrGetChartReference will not be able to find existing ones and will reopen new. 2. Is it possible to open the chats by sc.OpenChartOrGetChartReference with not rolled over instrument (and of course, without changing Global Symbol settings to Not Defined)? Then I have found one strange behavior of sc.GetChartName() function in the above case (from the chart with expired symbol sc.OpenChartOrGetChartReference opens rolled over charts and returns correct chart number). In such case sc.GetChartName() with the chart number received from sc.OpenChartOrGetChartReference returns nothing. (Please note, that if the chart with the study has non-expired instrument then sc.GetChartName() returns correct chart name) The question: 3. Is that correct behavior of sc.GetChartName()? Thank you very much in advance and With kind regards GmA |
[2015-05-27 18:04:04] |
Sierra Chart Engineering - Posts: 104368 |
1. No but this is what was specified by TransAct and this is why you see what you do. We did previously advise them that it will cause problems to use Chart >> Chart Settings >>Automatically Rollover Futures Symbol by default. 2. We will make sure that when opening a chart programmatically that Automatically Rollover Futures Symbol is disabled. 3. Most likely this is a timing issue because the name has not yet been set at the time you get it. If you were to get the name later, you should be able to get it. 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-05-27 18:06:56
|
[2015-05-27 18:28:21] |
GmA - Posts: 20 |
Thank you very much. As for the question 3. Is there a possibility to return from sc.OpenChartOrGetChartReference after Chart Name has been formed? Checking of the name has been done on the next call of the study after sc.OpenChartOrGetChartReference were called and still it was not there. Just to clarify that when study is set on the non-expired chart all is working fine. Thanks in advance GmA |
To post a message in this thread, you need to log in with your Sierra Chart account: