A possible alternative:
Add the same symbol to your chart as a second instrument, Data2. It should be added as a minute-based chart, using a session that matches the time period of the daily session (5:00 PM to 4:59 PM in your case).
Then, change the number of minutes for the chart to the number of minutes in that session. For example, if the session runs continuously from 5:00 PM to 4:59 PM -- without any interruptions -- then data2 should be set to a chart with 1440-minute bars (60 minutes times 24 hours). You should end up with data2 being a 1440-minute bar that lasts from 5:00 PM to 4:59 PM.
In your code, you can then reference the data2 series to get the "daily" highs, lows, etc. for that session. E.g.:
Code:
HighestVal = High of Data2;