MAX

Category: Mathematical

The MAX function in ProBuilder language is a mathematical function used to determine the maximum value between two given values or variables. This function is particularly useful in scenarios where you need to compare two data points and use the larger of the two for further calculations or analysis.

Syntax:

MAX(a, b)

Where a and b are the two values or variables to be compared.

Example:

mmA = average[20](high)
mmB = average[50](high)
result = MAX(mmA, mmB)
RETURN result

In this example, mmA is the 20-period moving average of the high prices, and mmB is the 50-period moving average of the high prices. The MAX function compares these two averages and assigns the greater value to the variable result, which is then returned.

  • The MAX function is essential when dealing with multiple data series or indicators and you need to identify the highest value among them.
  • This function can be used in various contexts, such as finding the maximum price, volume, or any custom calculations in your trading strategy.

Understanding the use of the MAX function can help in creating more dynamic and condition-responsive trading algorithms.

Related Instructions:

  • MIN mathematical
  • Logo Logo
    Loading...