def WWMA(df, n, price='Close'):
    """
    Welles Wilder Moving Average
    Returns: list of floats = jhta.WWMA(df, n, price='Close')
    Source: https://www.fmlabs.com/reference/default.htm?url=WellesMA.htm
    """
    wwma_list = []
    for i in range(len(df[price])):
        if i + 1 < n:
            wwma = float('NaN')
            wwma_list.append(wwma)
            wwma = df[price][i]
        else:
            wwma = (wwma * (n - 1) + df[price][i]) / n
            wwma_list.append(wwma)
    return wwma_list
