pandas_indicators.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:PythonTrading 作者: F2011B 项目源码 文件源码
def MassI(df):
    Range = df['High'] - df['Low']
    EX1 = pd.ewma(Range, span = 9, min_periods = 8)
    EX2 = pd.ewma(EX1, span = 9, min_periods = 8)
    Mass = EX1 / EX2
    MassI = pd.Series(pd.rolling_sum(Mass, 25), name = 'Mass Index')
    df = df.join(MassI)
    return df

#Vortex Indicator: http://www.vortexindicator.com/VFX_VORTEX.PDF
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号