def EOM(df, n):
EoM = (df['high'].diff(1) + df['low'].diff(1)) * (df['high'] - df['low']) / (2 * df['volume'])
Eom_ma = pd.Series(pd.rolling_mean(EoM, n), name = 'EoM' + str(n))
return Eom_ma
#Commodity Channel Index
评论列表
文章目录