- Desktop
- Scripting
- Formulas and Scripting Functions
- MAX() and MIN() Functions
MAX() and MIN() Functions
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])Your privacy choices
We use cookies and similar technologies to make the site work, see how it's used, and improve it. Analytics and advertising cookies only run with your consent — see our Privacy Policy for details.