math.log
The natural logarithm of number: its logarithm to base e.
It is defined for a number greater than zero.
This is the only logarithm in the namespace. There is no base-10 logarithm, and a script that calls one fails.
math.log(const float number) → const floatmath.log(input float number) → input floatmath.log(series float number) → series floatmath.log(simple float number) → simple float| Parameter | Type | Required | Description |
|---|---|---|---|
number | const float | yes | The number to take the natural logarithm of. |
Returns const float or input float or series float or simple float — The natural logarithm, as a float in the argument’s form.
indicator("Log price")
plot(math.log(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.