Login Page - Create Account

Support Board


Date/Time: Sat, 05 Jul 2025 11:20:46 +0000



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

[2020-12-28 10:06:09]
BrMa - Posts: 80
Dear support,

my study needs information of a daily-chart, so I'm opening it with sc.OpenChartOrGetChartReference(). I'm doing this in the setDefaults-section of the study because doing this later on causes a re-calculation of the study without a need for it. So far everything works fine and the calculations are done properly. After the loading of the study (which is used by two charts in the same chartbook), the windows and chartbook window show the expected content (please see WindowsAndChartbooks1.png, which is perfectly fine!).

When I'm saving, closing and re-opening the chartbook the hidden referenced chart is shown there two times but with the same ID!? (please see WindowsAndChartbooks2.png). The issue is: everytime I save the chartbook (for whatever reason), another hidden chart is added with the next opening of the chartbook, causing LOTS of hidden charts but all with the same ID!? When closing the charts manually, there is a warning message for all windows saying they are referenced by chart #7 (what is true but why are ALL referenced and not only one!?).

How can I prevent unused charts being created or make SierraChart use the already existing chart after a reload of the chartbook?
As the settings for the hidden chart do not change, why isn't the "saved" hidden chart (in this example with ID #3) referenced?

Thanks a lot in advance for your help!
Regards, Markus
imageWindowsAndChartbooks1.png / V - Attached On 2020-12-28 09:32:05 UTC - Size: 15.37 KB - 235 views
imageWindowsAndChartbooks2.png / V - Attached On 2020-12-28 09:33:30 UTC - Size: 19.92 KB - 242 views