Skip to content

Vector Log10

LOG10 calculates the base 10 logarithm of each element in the input array.

Method

tm.ta.log10(source)

Inputs

ParameterArgument typeDescriptionDefault Value
sourcepd.SeriesInput data series-

Outputs

OutputType
log10np.ndarray

Example usage

strategy.py
import tradomate as tm
@tm.strategy()
def my_strategy(config: tm.TradomateConfig, data: tm.TradomateData):
# Trying out Vector Log10
log10 = tm.ta.log10(data.close)
# Get the last value and print
last_value = log10.iloc[-1]
tm.log(f"Last value of Vector Log10 is {last_value}")
# Plot the values of log10
tm.plot(log10, title="Vector Log10", overlay=False)