Skip to content

Minus Directional Indicator

MIN measures the strength of downward price movement.

Method

tm.ta.min(source, timeperiod)

Inputs

ParameterArgument typeDescriptionDefault Value
sourcepd.SeriesInput data series-
timeperiodintNumber of periods for the indicator30

Outputs

OutputType
minnp.ndarray

Example usage

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