Skip to content

MAX() and MIN() Functions

By Optuma Team · Updated 2020-11-04

The MAX() and MIN() functions allow you to display the highest/lowest value between two functions or variables. For example, to use the highest values of two moving averages: the MAX(V1, V2) function would return the value of the highest moving average line.

V1 = MA(BARS=5, CALC=Close, STYLE=Simple);
V2 = MA(BARS=13, CALC=Close, STYLE=Exponential);
MAX(V1, V2)

To show the highest value between today’s high and yesterday’s close:

MAX(HIGH(),CLOSE()[1])

For the lowest value between today’s low and yesterday’s close:

MIN(LOW(),CLOSE()[1])

Choose which categories of cookies you allow. Strictly-necessary cookies are always on. You can change this any time via the "Cookie Settings" link in the footer.

  • Functional

    Remember preferences like dismissed banners and your dark-mode choice.

  • Analytics

    Help us understand how the site is used so we can improve it.

  • Marketing

    Measure our advertising and help us reach people who may be interested in Optuma.