The MIN function in ProBuilder language is used to determine the minimal 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 lesser of the two for further calculations or decision-making processes.
MIN(a, b)
Where a and b are the two values or variables to be compared.
mmA = average[20](low)
mmB = average[50](low)
result = MIN(mmA, mmB)
RETURN result
In this example, mmA represents the 20-period moving average of the low prices, and mmB represents the 50-period moving average of the same. The MIN function is used to find the lower value between mmA and mmB. The result, which is the minimal value, is then returned.
This function is straightforward but essential in many trading strategies and data comparison tasks, where determining the lesser of two values is necessary.