Skip to content

Min-Max Normalize

Math · Normalize

Min-Max Normalize node on the canvas

Rolling min-max rescale to [0, 1]: (value − rolling min) ÷ (rolling max − rolling min). 0 = at the window's bottom, 1 = at the top. Constant windows (zero range) emit NaN. Useful for combining heterogeneous indicators on a common 0–1 scale.

Min-Max Normalize rescales a series to a 0–1 range based on its recent high and low. At the bottom of the window it reads 0, at the top 1, and proportionally in between. It's how you put wildly different indicators onto a common scale so they can be compared or combined — an ATR in price units and an RSI in 0–100 become two 0–1 series you can average, weight, or threshold the same way.

How it works

Each bar the block computes (value − rolling min) / (rolling max − rolling min) over the Window (bars) (default 20). The result is the value's relative position within its recent range: 0 = at the window's low, 1 = at the window's high. A flat window (zero range) emits NaN. Feed it Bars (uses close) or any series.

When to use it

Use Min-Max Normalize to combine heterogeneous indicators. Building a composite score from several signals? Normalise each to 0–1 first so none dominates just because its raw numbers are bigger. It's also a quick way to read any series as "near the top vs bottom of its recent range" — a 0.9 reading means "high for this window" regardless of the underlying units. Compare it to Standardize: min-max bounds everything to [0,1] (sensitive to the window's extremes), while standardize uses standard deviations (sensitive to the distribution's spread).

Example

A combined score: normalise an RSI and a normalised-ATR each to 0–1 with Min-Max Normalize, then Add them and halve with Scalar Math for a blended 0–1 momentum-plus-volatility score. Threshold it with a Greater Than and backtest in the Tester.

Tips & gotchas

  • Bounds to [0,1] — the common scale for combining different indicators.
  • 0 = window low, 1 = window high — it reads relative position, not absolute value.
  • Flat window → NaN (zero range) — rare, but handle it if your series can go constant.
  • Versus Standardize — min-max is range-bounded; standardize is distribution-based (z-scores). Pick by whether you want bounded or spread-aware.

Inputs

Socket Type What to wire in
In series / bars Source series. BARS input uses close.

Outputs

Output Type Plots as Description
0–1 series Line · sub-pane Per-bar rescaled value in [0, 1].

Parameters

Parameter Type Default What it does
Window (bars) number · 2–500 20 Rolling window for the min / max.

Reference auto-generated from the block catalog · category Math.