I updated the title of the question in the hopes it will make it easier for folks searching for this solution to find it. I was not able to include the full context of the request within the title without using 9 words or less. But I think I captured the main context of the request.
The following code will display both the high of day as well as the previous day close on the chart. And the label will show the percent change from the high of day to the midpoint. In cases where the high of day is less than previous day close, the label will display a positive value. Negative values display when the high of day is greater than greater than the previous day close.
def newDay = GetDay() <> GetDay()[1];
rec highOfDay = if newDay then high else if high > highOfDay[1] then high else highOfDay[1];
def previousClose = close(period = AggregationPeriod.DAY)[1];
plot intradayHigh = highOfDay;
intradayHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
plot midpoint = previousClose + ((highOfDay - previousClose) / 2);
midpoint.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
def percentDifference = Round(100 * (midpoint / highOfDay - 1), 1);
AddLabel(yes, Concat("Percent Difference: ", percentDifference), Color.WHITE);