low - PineScript Variable
Overview
Section titled “Overview”low records the lowest traded price observed within the current bar. It updates whenever price prints a new trough.
Remarks
Section titled “Remarks”- Use
low[1],low[2], etc., to reference prior bar lows when detecting breakdowns or calculating trailing stops. - On synthetic chart types the value reflects the transformed price data rather than raw trades.
- Pair with
highto compute range-based indicators or volatility bands.
Example
Section titled “Example”//@version=5indicator("Swing low marker", overlay=true)
len = input.int(5, "Swing length", minval=1)isSwingLow = ta.lowest(len) == low and ta.lowest(len)[1] != low
plotshape(isSwingLow, style=shape.triangledown, location=location.belowbar, color=color.new(color.red, 0), text="Swing↓")