high - PineScript Variable
Overview
Section titled “Overview”high records the highest traded price observed within the current bar. It updates whenever a new peak is registered.
Remarks
Section titled “Remarks”- Reference historical highs with
high[1],high[2], etc., for breakout logic. - On synthetic chart types the value derives from the transformed price series.
- Combine with
lowandcloseto calculate range or volatility metrics.
Example
Section titled “Example”//@version=5indicator("Daily high breakout", overlay=true)
length = input.int(20, "Lookback", minval=1)highestHigh = ta.highest(high, length)
plot(highestHigh, "Rolling high", color=color.orange)plotshape(high > highestHigh[1], title="Breakout", location=location.abovebar, style=shape.labelup, color=color.new(color.green, 0), text="Break↑")