def CHENOW_PLUNGER(df, n, atr_n = 40):
atr = ATR(df, atr_n)
high = pd.Series((pd.rolling_max(df['high'], n) - df['close'])/atr, name = 'CPLUNGER_H'+ str(n))
low = pd.Series((df['close'] - pd.rolling_min(df['low'], n))/atr, name = 'CPLUNGER_L'+ str(n))
return pd.concat([high,low], join='outer', axis=1)
#Donchian Channel
评论列表
文章目录