Support Board
Date/Time: Mon, 21 Apr 2025 17:18:45 +0000
Post From: ACSIL sc.DailyHigh & sc.DailyLow
[2025-04-18 02:33:14] |
Gradient - Posts: 121 |
Hi, I'm using sc.DailyHigh and sc.DailyLow to compute the current day's range. However, I noticed that these values refer to the prior session's high or low at the open of a new day. How can these values be reset at the start of the next trading session? I've attached a couple of screenshots of the test I ran. I have a study where Actual is the current day's range. Daily High and Daily Low are the sc.DailyHigh and sc.DailyLow variables stored in subgraphs. The Actual value is computed as the difference between the sc.DailyHigh and sc.DailyLow stored in a variable then stored in the subgraph. Looking at Screenshot 1 you can see the Actual has a value of 73.50. However, the Daily High of 5724.75 is the high of the last bar prior to the start of the current session. Viewing Screenshot 2, the Actual value is 174.25 because the Daily Low is still set to the prior session's Daily Low of 5651.25. The actual Daily Low for the current session is 5776.75. This creates an inaccurate Actual daily range value. Is there a method that resets these values at the start of the session? Thanks |
![]() ![]() |