Keep in mind that this Q&A forum is here to provide a searchable knowledge-base of custom solutions that benefit the majority of our viewing audience. Each and every post in the forum should be something that a large number of our audience is going to recognize and use.
When referring to another source, always provide a link to that source. This applies whether that source is in this very forum or even from another website. This helps the rest of our viewing audience understand the full context of your request and make the best use of the solution.
Here is the link for the previous solution you reference in your request:
https://www.hahn-tech.com/ans/higher-high-higher-close-with-increasing-volume-on-two-consecutive-candles/
However the solution to your current request doesn't really need anything from that previous solution, except for one line. Which is the line that determines the close is within 10% of the high.
So for this solution I pretty much just start from scratch:
def pattern = open <= close[1] and low < low[1] and high < high[1] and close > close[1];
def topTenPercent = close >= high * 0.9;
plot signal = pattern and topTenPercent and volume > volume[1];
signal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
signal.SetDefaultColor(Color.Green);
signal.SetLineWeight(1);
From your question title I see that you mentioned a specific time frame. The time frame is selected at the chart level. So you can apply this to whatever time frames are supported for charts of Thinkorswim.
If you are trying to learn how to build these for yourself. I will point out that the first line of code is a direct word for word translation of the description you gave:
open is <=previous bar close, and Low is<previous bar low and high<previous bar high, but close>previous bar close