def macd_rule_2(df, symbol):
try: df = MACD(df)
except: return False
input_1 = -3
input_2 = -0.2
index = -1
return (df['macd_dif'][index] > input_1) & \
(df['macd_dif'][index] < input_2) & \
(df['macd_dif'][index] > df['macd_dea'][index]) & \
((df['macd_dea'][index-1] > df['macd_dif'][index-1]) | (abs(df['macd_dea'][index-1] - df['macd_dif'][index-1]) < 0.007))
Filter_Stock_CHN_1.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录