def macd_rule_2(df, index = -1):
try:
if not {'macd_dif', 'macd_dea', 'macd'}.issubset(df.columns):
df = MACD(df)
except Exception as e:
print(e)
return False
input = 0.05
return (df['macd_dif'][index] < input) & (df['macd_dea'][index] < input)
评论列表
文章目录