(df)
return out(SETTINGS, df, result)
Mass Index
Mass Index
Mass Index
def MassI(df):
    """
    Mass Index
    """
    Range = df['High'] - df['Low']
    EX1 = Range.ewm(span=9, min_periods=8).mean()
    EX2 = EX1.ewm(span=9, min_periods=8).mean()
    Mass = EX1 / EX2
    result = pd.Series(Mass.rolling(25).sum(), name='Mass Index')
    return out(SETTINGS, df, result)
def MassI ( df ) : Range = df [ 'High' ] - df [ 'Low' ] EX1 = Range . ewm ( span = 9 , min_periods = 8 ) . mean ( ) EX2 = EX1 . ewm ( span = 9 , min_periods = 8 ) . mean ( ) Mass = EX1 / EX2 result = pd . Series ( Mass . rolling ( 25 ) . sum ( ) , name = 'Mass Index' ) return out ( SETTINGS , df , result )