MAX() and MIN() Functions

Author: Optuma Team Last updated: Nov 4, 2020 02:49

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:

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