Support Board
Date/Time: Tue, 26 Aug 2025 10:32:40 +0000
Post From: Strange Code Behavior
[2025-07-21 09:41:11] |
User250096 - Posts: 10 |
Encountered many inexplicable code behaviors when using the following study: 1.During the first load, the value of sc.Close[sc.Index] is 4.2095, but after recalculation, it changes to 5.6320, which is the correct value. This issue occurs across all charts. 2.The variable dir is passed as an external parameter to the function getSumPL, and its value should remain unchanged (in this case, it should stay as 1). However, it occasionally changes to -1 at certain points, even though there is no code modifying it within the function.At these point, sc.Close[sc.Index] also change into 4.2095. 3.In some cases, when printing sc.Close[sc.Index] twice in rapid succession, the output changes—shifting from the correct value 5.6320 to 4.2095 (observed in Subgraph[4] and Subgraph[5]). https://www.sierrachart.com/image.php?Image=1753090753713.png |
Private File |