| | |
| | | limit_up_time = limit_up_time_manager.LimitUpTimeManager().get_limit_up_time_cache(code) |
| | | if limit_up_time is None: |
| | | limit_up_time = tool.get_now_time_str() |
| | | score = first_code_score_manager.get_score(code, volume_rate, limit_up_time, True) |
| | | |
| | | cls.__l2PlaceOrderParamsManagerDict[code] = l2_trade_factor.L2PlaceOrderParamsManager(code, is_first_code, |
| | | volume_rate, |
| | | volume_rate_index, |
| | | score, |
| | | total_datas[-1][ |
| | | 'val']['time']) |
| | | # score = first_code_score_manager.get_score(code, volume_rate, limit_up_time, True) |
| | | # cls.__l2PlaceOrderParamsManagerDict[code] = l2_trade_factor.L2PlaceOrderParamsManager(code, is_first_code, |
| | | # volume_rate, |
| | | # volume_rate_index, |
| | | # score, |
| | | # total_datas[-1][ |
| | | # 'val']['time']) |
| | | cls.volume_rate_info[code] = (volume_rate, volume_rate_index) |
| | | |
| | | latest_time = add_datas[len(add_datas) - 1]["val"]["time"] |
| | |
| | | left_big_num) |
| | | cls.__l2PlaceOrderParamsManagerDict[code].set_score(score) |
| | | |
| | | logger_place_order_score.info("code={},data='score_index':{},'score_info':{}", code, |
| | | cls.__l2PlaceOrderParamsManagerDict[code].score_index, |
| | | cls.__l2PlaceOrderParamsManagerDict[code].score_info) |
| | | # logger_place_order_score.info("code={},data='score_index':{},'score_info':{}", code, |
| | | # cls.__l2PlaceOrderParamsManagerDict[code].score_index, |
| | | # cls.__l2PlaceOrderParamsManagerDict[code].score_info) |
| | | |
| | | if not gpcode_manager.WantBuyCodesManager().is_in_cache(code): |
| | | if TradeTargetCodeModeManager().get_mode_cache() == TradeTargetCodeModeManager.MODE_ONLY_BUY_WANT_CODES: |
| | | return False, True, f"只买想买单中的代码" |
| | | score_index = cls.__l2PlaceOrderParamsManagerDict[code].score_index |
| | | score = cls.__l2PlaceOrderParamsManagerDict[code].score |
| | | score_info = cls.__l2PlaceOrderParamsManagerDict[code].score_info |
| | | score_index = None #cls.__l2PlaceOrderParamsManagerDict[code].score_index |
| | | score = None #cls.__l2PlaceOrderParamsManagerDict[code].score |
| | | score_info =None #cls.__l2PlaceOrderParamsManagerDict[code].score_info |
| | | |
| | | # lp = LineProfiler() |
| | | # lp.enable() |
| | |
| | | # return False, True, f"量大于40%才下单,量比:{volume_rate_info[0]}" |
| | | |
| | | # 是否有K线形态(有K线形态或者天量大阳),10点后才需要判断是否有K线形态与分值 |
| | | if int(tool.get_now_time_str().replace(":", "")) > int("100000"): |
| | | has_k_format = score_info[1][3][6][0] or score_info[1][3][7][0] |
| | | if not has_k_format: |
| | | return False, True, f"无K线形态" |
| | | |
| | | if score_index < 0: |
| | | return False, True, f"分值:{score}未达到需要买入的分数线" |
| | | return True, False, "" |
| | | # if int(tool.get_now_time_str().replace(":", "")) > int("100000"): |
| | | # has_k_format = score_info[1][3][6][0] or score_info[1][3][7][0] |
| | | # if not has_k_format: |
| | | # return False, True, f"无K线形态" |
| | | # |
| | | # if score_index < 0: |
| | | # return False, True, f"分值:{score}未达到需要买入的分数线" |
| | | # return True, False, "" |
| | | |
| | | @classmethod |
| | | def __cancel_buy(cls, code): |