Support Board
Date/Time: Fri, 22 Nov 2024 17:23:07 +0000
Post From: Changes to Chart Settings > Chart Data > Dates to Exclude ignored
[2024-09-09 19:00:25] |
Mark Lewis - Posts: 25 |
Update: we need more time to look into this because it does not look to us there is a problem.
To clarify, I'm trying to accomplish this on a chart accompanied by the built-in TPO Profile Chart study. I have isolated the code to the following study and can reproduce the problem consistently on my end. Thanks again for looking into this! #include "sierrachart.h" SCDLLName("TPO Test") /*==========================================================================*/ SCSFExport scsf_TPOTest(SCStudyInterfaceRef sc) { // Set configuration variables if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "TPO Test"; sc.GraphRegion = 0; sc.AutoLoop = 0; return; } int& r_ExcludeDateMenuID = sc.GetPersistentInt(1); int& r_ClearExcludedDatesMenuID = sc.GetPersistentInt(2); if (sc.IsFullRecalculation != 0) { if (r_ExcludeDateMenuID <= 0) { r_ExcludeDateMenuID = sc.AddACSChartShortcutMenuItem(sc.ChartNumber, "Add date to exclude list"); r_ClearExcludedDatesMenuID = sc.AddACSChartShortcutMenuItem(sc.ChartNumber, "Clear excluded dates"); } } if (sc.MenuEventID != 0) { if (sc.MenuEventID == r_ExcludeDateMenuID) { SCDateTime SelectedTPODateTime = sc.BaseDateTimeIn[sc.ActiveToolIndex]; sc.AddDateToExclude(sc.ChartNumber, SelectedTPODateTime); sc.FlagToReloadChartData = 1; } if (sc.MenuEventID == r_ClearExcludedDatesMenuID) { sc.DatesToExcludeClear(sc.ChartNumber); sc.FlagToReloadChartData = 1; } } } |