I think I am still guessing at what you want.
This just displays a horizontal line on the last day of an intra-day chart at the level of the highest bar of the day index provided as the input.
You may find someone that understands what you mean in the ThinkScript Chat on TOS. Some very clever folks on there!
input lookbackDays=1;
def ReferenceValue=high(period=AggregationPeriod.day)[lookbackDays];
def barRef=if ReferenceValue!=ReferenceValue[1] then barnumber() else barRef[1];
def plottime=barRef==highestall(barRef) ;
plot PriorDayHigh=if (plottime) then ReferenceValue else double.nan;
PriorDayHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
--------------
If you provide some actual rendition of what you are doing, may go a long way for discovering what you are trying to do. A chart, with symbol, and your timeframe (none of which has been disclosed).
Do you have code which does something, and you wish it did something else and provide some hints?