Navigation: Realtest Script Language > Syntax Element Details > MaxN Category General-Purpose Functions Description Nth largest of a group of values Syntax MaxN(N, value1, value2, ...) Parameters N - number from 1 to count of values value1 - any formula value2 - any formula ... - any number of additional comma-separated formulas Notes This function evaluates each of the formulas passed to it and returns the Nth largest value found. MaxN(1, value1, value2) is the same as Max(value1, value2). Example SecondBest: MaxN(2, O, H, L, C) The second-highest of today's OHLC values. Copyright © 2020-2026 Systematic Solutions, LLC