Sidechair

high

Browse the reference

The highest price traded during the current bar.

Try it in the editor

high is a series float. It is always at least as large as open, close and low on the same bar.

On the live bar, high only ever grows as new trades print, so a level you compare against high can be crossed mid-bar and stay crossed.

Type

series float

Remarks

  • high[n] is na before the first bar of the chart.
  • ta.highest(high, n) returns the largest high over the last n bars, including the current one.

Example

Pine ScriptBreakout of the prior highOpen in editor
//@version=6
indicator("Break of previous high", overlay = true)
prior = ta.highest(high, 20)[1]
plot(prior, "20-bar high", color.orange)
plotshape(close > prior, "Breakout", shape.triangleup, location.belowbar, color.green, size = size.tiny)

See also

Runs on Sidechair