Random

Category: Instructions

The Random function in ProBuilder language is used to generate a random integer number within a specified range. This function is particularly useful in scenarios where you need to simulate randomness or unpredictability in your code, such as in testing environments or for creating random data samples.

Syntax:

Random(limit1, limit2)

The function takes two parameters, limit1 and limit2, which define the inclusive boundaries of the random number range. The function will return a random integer that falls between these two limits.

Example:

a = Random(-100, 1000)
return a

In this example, the Random function is used to generate a random integer between -100 and 1000. The result is stored in the variable a and then returned.

Additional Information:

  • The order of limit1 and limit2 does not matter; the function will correctly interpret the lower and upper bounds regardless of their order.
  • Each execution of the Random function will produce a different result, ensuring variability in the output.

This function is a basic utility in ProBuilder and does not relate directly to financial indicators or trading strategies, but it can be used in various programming contexts where randomization is required.

Logo Logo
Loading...