Support Board
Date/Time: Mon, 21 Apr 2025 13:35:38 +0000
Post From: ACSIL Drawings Disappear Upon Chart Reload
[2025-03-08 16:50:16] |
User431178 - Posts: 651 |
// Use persistent variables to remember attached order IDs so they can be modified or canceled. int32_t& CurrentPivotValue = sc.GetPersistentInt(10); // Stores the pivot value (either high or low) for the most recent direction trend int32_t& CurrentPivotIndex = sc.GetPersistentInt(11); // Stores the index of the pivot value for the most recent direction trend int32_t& LastPivotValue = sc.GetPersistentInt(12); // Stores the last pivot value for the previous direction trend int32_t& LastPivotIndex = sc.GetPersistentInt(13); // Stores the last pivot index for the previous direction trend int32_t& PivotType = sc.GetPersistentInt(14); // Stores the type of pivot that most recently occurred (PIVOT_HIGH or PIVOT_LOW) int32_t& PivotDrawingNum = sc.GetPersistentInt(15); // Stores the drawing line number of the last pivot drawing in case it needs to be deleted Try zeroing out the persistent variables on chart reload. if (sc.IsFullRecalculation && sc.Index == 0) { /// Reset persist vars } ACSIL drawings are automatically deleted on reload, but persist var are not automatically reset. |