Support Board
Date/Time: Wed, 15 Jan 2025 21:49:28 +0000
[User Discussion] - Question about sc.ChartWindowHandle
View Count: 1085
[2017-09-26 13:46:54] |
GmA - Posts: 20 |
Dear Support! It looks sc.ChartWindowHandle and sc.GetChartWindowHandle(sc.ChartNumber) return different handles. First one returns correct handle of the chart window and the second one the handle of main sierra window (where title is "AT 1615 ..." ). Is that a normal behavior? Please find used code below: SCSFExport scsf_TestWndHandle(SCStudyGraphRef sc) { SCString MessageString; if (sc.SetDefaults) { sc.GraphName = "TestWndHandle"; // During development set this flag to 1, so the DLL can be rebuilt without restarting Sierra Chart. When development is completed, set it to 0 to improve performance. sc.FreeDLL = 1; sc.AutoLoop = 0; //Auto looping is enabled. return; } if (sc.UpdateStartIndex < sc.ArraySize -1) { MessageString.Format("%s :: Chart Number = %d Chart window Handle = 0x%.08X Chart window Handle from function = 0x%.08X", sc.Symbol.GetChars(), sc.ChartNumber, sc.ChartWindowHandle, sc.GetChartWindowHandle(sc.ChartNumber)); sc.AddMessageToLog(MessageString,0); } } When I've set this study to 120 charts (10 charts in 12 automatically loading chart books) and have restarted Sierra, after start sc.ChartWindowHandle returns NULL until sc.UpdateStartIndex will not become equal to (sc.ArraySize - 1) for the first time. At the same time, sc.GetChartWindowHandle(sc.ChartNumber) returns main Sierra window handle all the time. Is that normal behavior as well? Thank you very much in advance GmA |
[2017-09-26 17:26:14] |
Sierra Chart Engineering - Posts: 104368 |
First one returns correct handle of the chart window and the second one the handle of main sierra window (where title is "AT 1615 ..." ). Is that a normal behavior? When I've set this study to 120 charts (10 charts in 12 automatically loading chart books) and have restarted Sierra, after start sc.ChartWindowHandle returns NULL until sc.UpdateStartIndex will not become equal to (sc.ArraySize - 1) for the first time. 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 |
To post a message in this thread, you need to log in with your Sierra Chart account: