Aroon
Aroon identifies the time elapsed since a security recorded its highest or lowest price.
Method
Section titled “Method”tm.ta.aroon(source_high, source_low, timeperiod)Inputs
Section titled “Inputs”| Parameter | Argument type | Description | Default Value |
|---|---|---|---|
| source_high | pd.Series | High prices series | - |
| source_low | pd.Series | Low prices series | - |
| timeperiod | int | Number of periods for the indicator | 14 |
Outputs
Section titled “Outputs”| Output | Type |
|---|---|
| aroondown | np.ndarray |
| aroonup | 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 Aroon aroondown, aroonup = tm.ta.aroon(data.high, data.low, timeperiod=14)
# Get the last value and print last_value = aroondown.iloc[-1] tm.log(f"Last value of Aroon is {last_value}")
# Plot the values of aroondown tm.plot(aroondown, title="Aroon", overlay=False)