Index of lowest value over a specified period
MININDEX returns the index of the lowest value over a specified period.
Method
Section titled “Method”tm.ta.minindex(source, timeperiod)Inputs
Section titled “Inputs”| Parameter | Argument type | Description | Default Value |
|---|---|---|---|
| source | pd.Series | Input data series | - |
| timeperiod | int | Number of periods for the indicator | 30 |
Outputs
Section titled “Outputs”| Output | Type |
|---|---|
| minindex | np.ndarray |
Example usage
Section titled “Example usage”import tradomate as tm
@tm.strategy()def my_strategy(config: tm.TradomateConfig, data: tm.TradomateData):
# Trying out Index of lowest value over a specified period minindex = tm.ta.minindex(data.close, timeperiod=30)
# Get the last value and print last_value = minindex.iloc[-1] tm.log(f"Last value of Index of lowest value over a specified period is {last_value}")
# Plot the values of minindex tm.plot(minindex, title="Index of lowest value over a specified period", overlay=False)