Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 11:39:04 +0000



how to avoid closing a user's already-opened chart

View Count: 604

[2019-11-04 23:29:54]
jsoctus - Posts: 3
Hello,
I am trying to programmatically reference the daily chart timeframe from other timeframes (e.g. the Daily from 5 min, 2 min, 30 min, weekly, etc.).
The sc.OpenChartOrGetChartReference function allows opening another chart to access the daily timeframe. I can get my data, then close the chart so the user doesn't have a lot of charts they must manually close. How can I be sure that the chart I close isn't one that the user had already opened? I believe that could happen if I use the sc.OpenChartOrGetChartReference and the user already has a daily chart open. Can I force sc.OpenChartOrGetChartReference to open a new chart that I can close without risking closing a user's needed chart?
John
[2019-11-05 12:45:48]
Sierra Chart Engineering - Posts: 104368
Can I force sc.OpenChartOrGetChartReference to open a new chart that I can close without risking closing a user's needed chart?
No, there just is not a solution to this. Unless we were to add a parameter to always force opening a new chart.
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
[2019-11-05 15:20:48]
jsoctus - Posts: 3
Is it a possibility to add that capability? I have tried other approaches, such as counting the number of open charts before I open to see if a new one appeared, but that doesn't help when a user changes timeframes and you do want to use the same chart that was just opened. I've also tried checking if the chart number is higher, but if there are gaps in the chart numbers, it uses the lowest unused number.

Being able to know which chart was programmatically opened would be very helpful, and forcing it to open new regardless of whether an existing chart could be used would provide that.
[2019-11-09 13:20:35]
Sierra Chart Engineering - Posts: 104368
Yes we will look at adding variables to support this.
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: 2019-11-09 13:22:01

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account