Lowest

[[lowest]] produces the rolling lower bound of a series. On each candle, it returns the lowest value in the window formed by the last length candles. The current candle is part of that window, so a new minimum appears in the output immediately.

The bound remains unchanged until a lower value enters the window or the existing minimum leaves it. When that minimum drops out, the smallest remaining value takes its place. Unlike an average, [[lowest]] does not combine the observations in the window: it retains only the lower extreme. With the default low source, that extreme is the lowest low in the recent window; with another source, it is the recent minimum of that series.

Block declaration

A strategy can contain multiple [[lowest]] blocks. Each block outputs one numeric series: the rolling minimum value.

Examples

Minimal setup

This block uses the implicit "low" source, so it tracks the lowest value observed over the last 20 bars.

[[lowest]]
id     = "lowest"
length = 20

Custom source and finding the optimal length

This block explores a range of values for length on the close series to identify the best-performing length.

[[lowest]]
id           = "lowest"
source       = "close"
length.start = 10
length.stop  = 30

Parameters

ParameterDescription
id
 String
 Required
Unique identifier for the resulting series.
source
 String
 or Array
 Optional
Input series used for the calculation.
Accepted forms: source = "hl2" or source = ["close", "hl2"].
Each value can be either a standard price source (open, close, high, low, hl2, hlc3, ohlc4, hlcc4, volume) or the id of another indicator.
Default value: "low"
length
 Integer
 Required
Window length; must be ≥ 1.

Usage:
• Fixed: length = value
• Grid search:
 – length.start = min_value
 – length.stop = max_value
 – length.step = value (optional, default 1)
symbol
 String or Array
 Optional
Market symbol(s) used when source only consists of standard prices (open, close, high, low, hl2, hlc3, ohlc4, hlcc4, volume).
If source mixes standard prices and indicator ids, symbol is applied only to combinations based on standard prices.
If source contains only indicator ids, symbol is ignored.
When omitted, the block inherits the [backtest] symbol.
For symbol format, arrays, and alignment rules, see Exchanges, Symbols and Timeframes.
timeframe
 String or Array
 Optional
Timeframe on which this indicator is computed.
If timeframe is omitted, the computation uses the grid’s main timeframe defined in [backtest].
For accepted formats and timeframe alignment rules, see Exchanges, Symbols and Timeframes.

Available variables

Use the identifiers below directly in your expressions. The lowest block exposes one numeric series and its parameters (length, source, symbol, timeframe).

Assume the block is configured as:

[[lowest]]
id     = "lowest"
length = 20

Then:

VariableDescription
lowest or lowest[0]
Decimal
Current rolling minimum. First valid sample appears after length - 1 candles.
lowest[n]
Decimal
Value n candles ago (e.g. lowest[1] for the previous bar).
lowest.length
Decimal
Effective window size used during the current combination.
lowest.source
String
Actual source id (low, close, another indicator).
lowest.symbol
String
Display name of the symbol feeding this block.
lowest.timeframe
String
Timeframe used for the computation.