VeighNa量化社区
你的开源社区量化交易平台
March's Avatar
Member
离线
1 帖子
声望: 0

请教大佬,我在class ArrayManager(object):中添加一个函数def is_K_gap如下,调用:if self.am.is_K_gap():报错如下:
AttributeError: 'ArrayManager' object has no attribute 'is_K_gap'
是什么原因?

def is_K_gap(self, array: bool = False)-> bool:
self.write_log("is_K_gap计算gap指标")
res_close = self.close
res_open = self.open
if abs(res_close[-2]-res_open[-2])/res_open[-2] >= 0.005:
return True
else:
return False

© 2015-2022 微信 18391752892
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】