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

在计算2022/04/01 07:21K线时发生错误! #73

Open
appleman4000 opened this issue Jan 29, 2025 · 0 comments
Open

在计算2022/04/01 07:21K线时发生错误! #73

appleman4000 opened this issue Jan 29, 2025 · 0 comments

Comments

@appleman4000
Copy link

appleman4000 commented Jan 29, 2025

在跑数据时发生assert错误,
[ERROR-AUDJPY]在计算2022/04/01 07:21K线时发生错误!
Traceback (most recent call last):
File "E:\BornToTry\main.py", line 50, in
for chan_snapshot in chan.step_load(): # 每增加一根K线,返回当前静态精算结果
File "E:\BornToTry\Chan.py", line 122, in step_load
for idx, snapshot in enumerate(self.load(self.conf.trigger_step)):
File "E:\BornToTry\Chan.py", line 217, in load
yield from self.load_iterator(lv_idx=0, parent_klu=None, step=step) # 计算入口
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\BornToTry\Chan.py", line 275, in load_iterator
self.add_new_kl(cur_lv, kline_unit)
File "E:\BornToTry\Chan.py", line 236, in add_new_kl
self.kl_datas[cur_lv].add_single_klu(kline_unit)
File "E:\BornToTry\KLine\KLine_List.py", line 130, in add_single_klu
self.cal_seg_and_zs()
File "E:\BornToTry\KLine\KLine_List.py", line 114, in cal_seg_and_zs
self.bs_point_lst.cal(self.bi_list, self.seg_list) # 再算笔买卖点
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\BornToTry\BuySellPoint\BSPointList.py", line 72, in cal
self.cal_seg_bs2point(seg_list, bi_list)
File "E:\BornToTry\BuySellPoint\BSPointList.py", line 180, in cal_seg_bs2point
self.treat_bsp2(seg, seg_list, bi_list)
File "E:\BornToTry\BuySellPoint\BSPointList.py", line 203, in treat_bsp2
self.add_bs(bs_type=BSP_TYPE.T2, bi=bsp2_bi, relate_bsp1=real_bsp1) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\BornToTry\BuySellPoint\BSPointList.py", line 103, in add_bs
exist_bsp.add_another_bsp_prop(bs_type, relate_bsp1)
File "E:\BornToTry\BuySellPoint\BS_Point.py", line 40, in add_another_bsp_prop
assert self.relate_bsp1.klu.idx == relate_bsp1.klu.idx
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

测试程序和数据在附件里

AUDJPY.zip

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

1 participant