Administrator
7 天以前 47316b01153e0b48c96d660874a63b32b857e0fd
cancel_strategy/s_l_h_cancel_strategy.py
@@ -1039,7 +1039,7 @@
                # 统计净涨停买的数量
                not_cancel_indexes_with_num = []
                re_start_index = start_index
                MAX_COUNT = 5
                MAX_COUNT = 15
                for j in range(start_index, end_index):
                    data = total_datas[j]
                    val = data['val']
@@ -1064,16 +1064,14 @@
                min_num = 0
                if not_cancel_indexes_with_num:
                    temp_count = len(not_cancel_indexes_with_num)
                    # 取后1/5的数据
                    # 取后1/2的数据
                    if temp_count >= 30:
                        temp_index = int(temp_count * 4 / 5)
                        if tool.is_sh_code(code):  # 上证取后3/10
                            temp_index = int(temp_count * 7 / 10)
                        temp_index = int(temp_count * 1 / 2)
                        re_start_index = not_cancel_indexes_with_num[temp_index][0]
                        MAX_COUNT = len(not_cancel_indexes_with_num[temp_index:])
                        MAX_COUNT = min(100, len(not_cancel_indexes_with_num[temp_index:]))
                    else:
                        not_cancel_indexes_with_num.sort(key=lambda x: x[1])
                        if temp_count >= 10:
                        if temp_count >= 30:
                            # 获取中位数
                            min_num = not_cancel_indexes_with_num[temp_count // 2][1]
                MIN_MONEYS = [300, 200, 100]