Support Board
Date/Time: Mon, 23 Dec 2024 00:12:44 +0000
Post From: Questions about sc.GetChartName and sc.OpenChartOrGetChartReference
[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 |