Skip to content

Triple Exponential Moving Average (T3)

T3 is a smoother and more responsive triple exponential moving average.

Method

tm.ta.t3(source, timeperiod, vfactor)

Inputs

ParameterArgument typeDescriptionDefault Value
sourcepd.SeriesInput data series-
timeperiodintNumber of periods for the indicator5
vfactorfloatVertical factor for the indicator0

Outputs

OutputType
t3np.ndarray

Example usage

strategy.py
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)