def Chaikin(df):
ad = (2 * df['close'] - df['high'] - df['low']) / (df['high'] - df['low']) * df['volume']
Chaikin = pd.Series(pd.ewma(ad, span = 3, min_periods = 2) - pd.ewma(ad, span = 10, min_periods = 9), name = 'Chaikin')
return Chaikin
#Money Flow Index and Ratio
评论列表
文章目录