Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CZSC的fx_list里面会出现重复分型 #147

Closed
robinchen opened this issue May 5, 2023 · 3 comments
Closed

CZSC的fx_list里面会出现重复分型 #147

robinchen opened this issue May 5, 2023 · 3 comments

Comments

@robinchen
Copy link

robinchen commented May 5, 2023

例如:SZSE.000831 日线2023-03-29这个底分型会出现重复。
是否可以将原来的
@Property
def fx_list(self) -> List[FX]:
"""分型列表,包括 bars_ubi 中的分型"""
fxs = []
for bi_ in self.bi_list:
fxs.extend(bi_.fxs[1:])
ubi = self.ubi_fxs
for x in ubi:
if not fxs or x.dt > fxs[-1].raw_bars[0].dt:
fxs.append(x)
return fxs

修改成
@Property
def fx_list(self) -> List[FX]:
"""分型列表,包括 bars_ubi 中的分型"""
fxs = []
for bi_ in self.bi_list:
fxs.extend(bi_.fxs[1:])
ubi = self.ubi_fxs
for x in ubi:
if not fxs or x.dt > fxs[-1].dt:
fxs.append(x)
return fxs

@zengbin93
Copy link
Member

多谢,已修正

@robinchen
Copy link
Author

大佬,客气

@zengbin93
Copy link
Member

@robinchen 你加下我微信 zengbin93,拉你进知识星球参与项目讨论

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants