Skip to main content

max

Syntax Format

max(lvalue, rvalue)

Overview

The max function provides the value, which is greater among the given data type. The data type can be a series as well as a sequence of numbers. At least two values need to be present in the parameters of the function to receive a result. This function is useful in scripts where you need to determine the greater value among those, taken into calculation.

Parameters

ParameterTypePurpose
lvaluenumeric or seriesFirst value, taken into calculation
rvaluenumeric or seriesSecond value, taken into calculation

Returns: series if lvalue and/or rvalue is seriesnumeric otherwise.

Example

max_value = max(1, 5, 10) -- the result will be 10