We appreciate your inquiry! While we’re not currently familiar with the specifics of Pine Script, we’ve attempted a modification based on your request. Please find the adjusted script below:
//@version=5
indicator(“Buy”, overlay=true)
length = 5
source = high
// Calculate the highest high price
highesthigh = ta.highest(source, length) * 1.02 // Increasing the highest high value by 2%
// Calculate Highest Close price
highesthigh = ta.highest(source, length)
// Add 2% to highest high
adjustedHighestHigh = highesthigh * 1.02
// Plot “Buy” label when current price surpasses adjusted highest high
plotshape(series=source > adjustedHighestHigh, title=“Buy”, location=location.belowbar, color=color.green, style=shape.labelup, text=“Buy”)
Can you check