def macd_rule_1(df):
try: df = MACD(df)
except: return False
input_1 = 0
input_2 = -0.8
input_3 = 0.05
dif_len = len(df['macd_dif'])
if dif_len < 2: return False
if abs(df['macd_dif'][-1]) > input_3:
return False
for idx in range(dif_len-1, 1, -1):
if ((df['macd_dif'][idx] - df['macd_dif'][idx-1]) > input_1):
continue
if df['macd_dif'][idx] <= input_2:
return True
else: return False
Filter_Stock_CHN_1.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录