Skip to content
Algo Trade Analytics Docs

math.random() - Pine Script Function

Returns a pseudo-random value. The function will generate a different sequence of values for each script execution. Using the same value for the optional seed argument will produce a repeatable sequence.

math.random(min, max, seed) → series float
NameTypeDescription
minseries int/floatThe lower bound of the range of random values. The value is not included in the range. The default is 0.

A random value.