Finally getting around to working this out. This sounds like a pretty simple request but the code requires several complex elements to get the details straight. I added a special touch just to see if I could do it. Which is to have the text in the custom column change to display which condition is present. Here is the code, attached screenshot shows how it looks.
input price = close;
def newDay = GetDay() != GetDay()[1];
def currentDay = GetDay() == GetLastDay();
rec dailyHigh = if newDay then high else if high > dailyHigh[1] then high else dailyHigh[1];
rec priorDailyHigh = if newDay and currentDay then dailyHigh[1] else priorDailyHigh[1];
def currentDailyHigh = if newDay then high else dailyHigh[1];
def newDailyHigh = price < priorDailyHigh and price > currentDailyHigh;
def newTwoDayHigh = if currentDay then price > priorDailyHigh and price > currentDailyHigh else 0;
def text = {default "Daily High", "Two Day High", "n/a"};
text = if newDailyHigh then text."Daily High" else if newTwoDayHigh then text."Two Day High" else text."n/a";
AddLabel(yes, if newDailyHigh == 1 then "DailyHigh" else if newTwoDayHigh then "2DayHigh" else "n/a", Color.BLACK);
AssignBackgroundColor(if newDailyHigh then Color.Blue else if newTwoDayHigh then Color.CYAN else Color.BLACK);
I just copy and pasted this code and tested it. Working fine on my end.