Skip to main content

ta.lowest#

Lowest value over the trailing length bars ending at i.

SYNTAX#

function ta.lowest(values: (number | null)[], length: number, i: number): number | null

ARGUMENTS#

  • values ((number | null)[]) — Series of input values.
  • length (number) — Window length. Must be positive.
  • i (number) — Current bar index.

RETURNS#

number | null — minimum over the window.

REMARKS#

Mirror of ta.highest; same warmup and null-propagation rules.

EXAMPLE#

const lows = [];
function onBar(i, ctx) {
  lows[i] = candles[i].low;
  const swingLow = ta.lowest(lows, 50, i);
  if (swingLow !== null) plot('swingLow', swingLow, { color: '#ef5350' });
}

SEE ALSO#

ta.highest, ta.atr