Triple Exponential Moving Average (T3)
T3 is a smoother and more responsive triple exponential moving average.
Method
tm.ta.t3(source, timeperiod, vfactor)
Inputs
Parameter | Argument type | Description | Default Value |
---|---|---|---|
source | pd.Series | Input data series | - |
timeperiod | int | Number of periods for the indicator | 5 |
vfactor | float | Vertical factor for the indicator | 0 |
Outputs
Output | Type |
---|---|
t3 | np.ndarray |
Example usage
import tradomate as tm
@tm.strategy()def my_strategy(config: tm.TradomateConfig, data: tm.TradomateData):
# Trying out Triple Exponential Moving Average (T3) t3 = tm.ta.t3(data.close, timeperiod=5, vfactor=0)
# Get the last value and print last_value = t3.iloc[-1] tm.log(f"Last value of Triple Exponential Moving Average (T3) is {last_value}")
# Plot the values of t3 tm.plot(t3, title="Triple Exponential Moving Average (T3)", overlay=False)