Syntax
Double.NEGATIVE_INFINITY
Description
Defines the negative value of infinitely large magnitude.
Example
input price = close;
def length = if close > close[1] then 20 else 30;
plot VariableMax = fold i = 0 to length with m = Double.NEGATIVE_INFINITY do Max(m, getValue(price, i, 30));
This script finds the greatest of several recent values of price, with a non-constant number of values being processed.