Administrator
2024-06-17 37934997a8aca96173cb016c1c63231b58e7b919
bug修复
4个文件已修改
9 ■■■■■ 已修改文件
code_attribute/first_target_code_data_processor.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
huaxin_client/l2_client.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_data_manager_new.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_transaction_data_processor.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
code_attribute/first_target_code_data_processor.py
@@ -156,7 +156,7 @@
                            l2_trade_util.forbidden_trade(code,
                                                          f"无辨识度,涨停价({limit_up_price})>50")
                            continue
                    if code_nature_analyse.is_price_too_high_in_days(code, volumes_data, limit_up_price)[0]:
                    if code_nature_analyse.is_price_too_high_in_days(code, volumes_data, limit_up_price)[0] and code.find("30")!=0:
                        # 判断是否太高
                        l2_trade_util.forbidden_trade(code, "6天内股价长得太高")
                        continue
huaxin_client/l2_client.py
@@ -484,6 +484,7 @@
        for sell_index in range(0, FirstLevelSellNum):
            print("first level sell [%d] : [%d]" % (sell_index, FirstLevelSellOrderVolumes[sell_index]))
class MyL2ActionCallback(L2ActionCallback):
    def OnSetL2Position(self, codes_data):
l2/l2_data_manager_new.py
@@ -954,8 +954,8 @@
    @classmethod
    def __can_buy_first(cls, code):
        if code.find("60") == 0:
            return False, True, f"上证暂不交易"
        # if code.find("60") == 0:
        #     return False, True, f"上证暂不交易"
        if not cls.__TradeStateManager.is_can_buy_cache():
            return False, True, f"今日已禁止交易"
l2/l2_transaction_data_processor.py
@@ -117,7 +117,7 @@
                    # 判断时间是否与本地时间相差5s以上
                    if tool.trade_time_sub(tool.get_now_time_str(), l2_huaxin_util.convert_time(datas[-1][3])) > 10:
                        now_seconds = int(tool.get_now_time_str().replace(":", ""))
                        if now_seconds < int("093200") or int("130000") <= now_seconds < int("130200"):
                        if now_seconds < int("093200"): #or int("130000") <= now_seconds < int("130200"):
                            need_cancel, cancel_msg = True, f"成交时间与本地时间相差10S以上,{l2_huaxin_util.convert_time(datas[-1][3])}"
                    if need_cancel:
                        L2TradeDataProcessor.cancel_buy(code, cancel_msg)