The last bar of the regular session low has a time stamp that varies based on the selected time frame. For example on a 15 min chart the last bar of the regular session is stamped 15:45. For the 5 min time frame the last bar is stamped 15:55. You must keep this in mind when applying the code below. The default value for endTime is set for a 15 min time frame.
When creating a new custom watchlist column for this you will need to set the time frame as described above, adjust the endTime value accordingly and ensure that you have checked the boxed labeled "Include Extended-Hours Trading session".
If any of the stocks in your watchlist do not contain trade data for the regular session hours this code will not work and nothing can be done work around this. No data, means the result will be something other than what you expect.
Here is the code:
def endTime = 1545;
def regularSessionEnd = SecondsTillTime(endTime) == 0;
rec dailyClose = if regularSessionEnd then close else dailyClose[1];
plot percentChange = 100 * (close / dailyClose - 1);