Vector Square Root
SQRT calculates the square root of each element in the input array.
Method
tm.ta.sqrt(source)
Inputs
Parameter | Argument type | Description | Default Value |
---|---|---|---|
source | pd.Series | Input data series | - |
Outputs
Output | Type |
---|---|
sqrt | np.ndarray |
Example usage
import tradomate as tm
@tm.strategy()def my_strategy(config: tm.TradomateConfig, data: tm.TradomateData):
# Trying out Vector Square Root sqrt = tm.ta.sqrt(data.close)
# Get the last value and print last_value = sqrt.iloc[-1] tm.log(f"Last value of Vector Square Root is {last_value}")
# Plot the values of sqrt tm.plot(sqrt, title="Vector Square Root", overlay=False)