math.ceil

The smallest whole number that is not less than number. The result is an int, not a float.

math.ceil(const float number) → const int
math.ceil(input float number) → input int
math.ceil(series float number) → series int
math.ceil(simple float number) → simple int
ParameterTypeRequiredDescription
numberconst floatyesThe number to round upwards.

Returns const int or input int or series int or simple int — An int in the argument’s form.

indicator("Close rounded up")
plot(math.ceil(close))

See also math.abs · math.acos · math.asin

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade