(df, n, price='Close')
return out(SETTINGS, df, result)
Moving Average
Moving Average
Moving Average
def MA(df, n, price='Close'):
    """
    Moving Average
    """
    name='MA_{n}'.format(n=n)
    result = pd.Series(df[price].rolling(n).mean(), name=name)
    return out(SETTINGS, df, result)
def MA ( df , n , price = 'Close' ) : name = 'MA_{n}' . format ( n = n ) result = pd . Series ( df [ price ] . rolling ( n ) . mean ( ) , name = name ) return out ( SETTINGS , df , result )