Loading

MONOTONIC


gts
Since v1.0.0
Available on all platforms
See also

Produces a new Geo Time Series™ from an input by modifying the value so the result is monotonous. This is technically applying a ratchet effect on values.

The MONOTONIC function expects a boolean on top of the stack and a Geo Time Series™ or list thereof below the boolean. The boolean indicates whether the result should be monotonically increasing (false) or decreasing (true).

Signature

Examples

NEWGTS 1 10 <% DUP DUP DUP DUP ADDVALUE %> FOR 'gts' STORE $gts false MONOTONIC $gts true MONOTONIC