Rank Node

Percentile Rank — Rolling Window

StatisticalNormalisation

Overview

The Rank Node computes the percentile rank of the current value within a rolling window. A rank of 100 means the current value is the highest in the window; 0 means the lowest.

Unlike Min-Max normalisation, Rank is ordinal — it counts position, not relative distance. This makes it robust to outliers and preserves the order of observations without distortion from extreme values.

Formula

rank[i] = count(v ≤ currentValue in window) / windowSize × 100
Output range: [0, 100]
100 = current value is at or above all values in window (period high).
0 = current value is at or below all values in window (period low).

Parameters

ParameterDefaultDescription
period20Rolling window size in bars

Inputs & Outputs

SlotDirectionTypeDescription
inputInput{ values, timestamps }Any upstream numeric series
valuesOutput(number | null)[]Percentile rank in [0, 100]; nulls during warm-up
timestampsOutputnumber[]Unix timestamps aligned to input

Use Cases

Outlier-Robust Normalisation

Rank is unaffected by extreme values — a single spike won't compress all other values to 0 as Min-Max would.

Composite Score Inputs

Convert multiple indicators to [0, 100] percentile ranks before summing into a composite signal for fair weighting.

Overbought / Oversold Filter

Rank above 80 = overbought relative to period; below 20 = oversold. Works on any series (price, volume, spread).

Tips & Best Practices

Prefer Rank Over Min-Max for Noisy Data

When your series has occasional data spikes or outliers, Rank provides more stable normalisation than Min-Max.

Step-Like Output

Rank produces discrete steps (multiples of 100/period). For a smoother normalised series, use Min-Max or Z-Score Pass instead.

Cross-Asset Scoring

Apply Rank to momentum or value factors across assets to produce a cross-sectional ranking suitable for long-short strategies.

Related Indicators