API documentation for pandas_ta.overlap.trima Python function.

trima(close, length=None, talib=None, offset=None, **kwargs)[source]#

Triangular Moving Average (TRIMA)

A weighted moving average where the shape of the weights are triangular and the greatest weight is in the middle of the period.

Sources: tma = sma(sma(src, ceil(length / 2)), floor(length / 2) + 1) # Tradingview trima = sma(sma(x, n), n) # Tradingview

Default Inputs:


SMA = Simple Moving Average half_length = round(0.5 * (length + 1)) SMA1 = SMA(close, half_length) TRIMA = SMA(SMA1, half_length)


close (pd.Series): Series of ‘close’s length (int): It’s period. Default: 10 talib (bool): If TA Lib is installed and talib is True, Returns the TA Lib

version. Default: True

offset (int): How many periods to offset the result. Default: 0


adjust (bool): Default: True fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method


pd.Series: New feature generated.