Support Board
Date/Time: Tue, 06 May 2025 02:26:26 +0000
[Programming Help] - sc.GetChartName performance issue
View Count: 140
[2025-01-16 13:09:48] |
binaryduke - Posts: 378 |
I am trying to get all names in the an chartbook. Minimal code example attached. When first opening the chartbook, all charts apart from the chart that the study is applied to return a blank name, even though I'm trying to delay running this function until calculations are complete. If I recalculate the chart after opening the chartbook, all chart names are returned. SCSFExport scsf_Chartbookloadingtest(SCStudyInterfaceRef sc)
{ if (sc.SetDefaults) { sc.GraphName = "Chartbook loading test"; sc.GraphRegion = 0; sc.AutoLoop = 1; } if ((sc.IsFullRecalculation) && (sc.SetDefaults != 1) && (sc.IsChartDataLoadingCompleteForAllCharts) && (sc.Index == (sc.ArraySize - 1))) { for (int ChartNumber = 1; ChartNumber <= sc.GetHighestChartNumberUsedInChartBook(); ChartNumber++) { SCString Chartname = sc.GetChartName(ChartNumber); SCString DEBUG; DEBUG.Format("%i %s", ChartNumber, Chartname.GetChars()); sc.AddMessageToLog(DEBUG, 0); } } } Message log output when opening chartbook: 2025-01-16 07:09:54.729 | Chart: ESM24_FUT_CME 1 Min #1 | Study: Chartbook loading test | 1 ESM24_FUT_CME 1 Min #1 2025-01-16 07:09:54.729 | Chart: ESM24_FUT_CME 1 Min #1 | Study: Chartbook loading test | 2 Message log output after recalculation: 2025-01-16 07:11:48.476 | Chart: ESM24_FUT_CME[M] 1 Min #1 | Study: Chartbook loading test | 1 ESM24_FUT_CME[M] 1 Min #1 2025-01-16 07:11:48.476 | Chart: ESM24_FUT_CME[M] 1 Min #1 | Study: Chartbook loading test | 2 6AU24_FUT_CME[M] 1 Min #2 Date Time Of Last Edit: 2025-01-16 13:12:21
|
[2025-01-16 15:12:22] |
Sierra_Chart Engineering - Posts: 19419 |
If there is a blank name, it is because the chart is not fully loaded. We cannot do anything to help with this. This is just how it is. 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, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2025-01-16 15:12:36
|
To post a message in this thread, you need to log in with your Sierra Chart account: