Login Page - Create Account

Support Board


Date/Time: Sat, 05 Jul 2025 12:18:44 +0000



Post From: Issues with charts opened with sc.OpenChartOrGetChartReference()

[2020-12-30 09:58:37]
BrMa - Posts: 80
First of all thank you for the fast response. Please let me anser to your questions/remarks:
If this is true, there would be a message in the Message Log indicating that a chart has been tagged for recalculation.
This is true - that's why I noticed the chart is tagged for recalculation! Please see the attached file MessageLog-TaggedForReload.png. Chart #2 and chart #7 are the charts the study is added to, chart #3 is the hidden chart created with sc.OpenChartOrGetChartReference().

This is because you are causing this circumstance to occur. How you are doing that is unknown to us. This is for you to solve. It certainly does not happen on its own if you are specifying the same PriorChartNumber when calling the function.
I do understand what you're saying and I tried already calling sc.CloseChart() for the created chart remembering PriorChartNumber when sc.LastCallToFunction is set but this gives me the error in the message log that the window can't be closed as it does not exist anymore. Having this in mind - doing this and saving the chartbook programmatically is also not an option removing the referenced chart.

Maybe raising the question another way leads to the proper solution:
What is your recommended solution on how and by which trigger to close a referenced chart opened at sc.UpdateStartIndex == 0 in manual-looping, so that it is not saved to the chartbook?
imageMessageLog-TaggedForReload.png / V - Attached On 2020-12-30 09:16:05 UTC - Size: 21.34 KB - 217 views